Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .