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?

link|improve this question
Well %temp% is per user, isn't it? So is your fear justified? – Randolph West 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
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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