The obvious question would be "Why not just write the temp file to the temp directory in the first place?"


Putting that aside for a moment, the default ACLs on C:\ dont allow the creation of files, only folders. So if the file isn't pre-existing it's definitely going to fail without Administrator rights. Assuming you have pre-created the file, dumping the ACLs and posting them here in SDDL will probably mke it easier to figure out what's going on.


It might also depend on how you're manipulating the file, attempting to write to it by recreating it might fall foul of the parent folder's NTFS permissions (though NT does some funky stuff to try to prevent that).