Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm thinking about moving the Windows 7 temp folders to a different partition to prevent excessive fragmentation. However, my concern is that if I simply change %TEMP%, user specific temporary files will lose their protection against read or write attempts from processes of different users.

Is my concern justified? How do I work around this?

share|improve this question
    
Well %temp% is per user, isn't it? So is your fear justified? –  user3463 Mar 11 '11 at 21:49
    
@Randolf: One does not need %temp% to double-click their way into another user's directory. –  grawity Mar 11 '11 at 21:53
    
I know this is largely unhelpful, but the solution to keeping your OS drive unfragmented is making your OS drive an SSD. ;) –  Shinrai Mar 12 '11 at 0:23
add comment

1 Answer

up vote 1 down vote accepted

The protection is based on standard NTFS access lists. By default, they inherit the ACL from the user profile directory.

  • When you create the temp folder, lock it down:

    icacls "%Temp%" /grant:r %Username%:F
    

    (/grant:r will replace the existing inherited permissions.)

    Alternatively, right-click on your new temp folder, click Properties and open the Security tab.

  • If you are going to batch-create the folders for all users, make sure you have their ownership right.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.