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 trying to make the \documentsettings\user\temp folder as read only to prevent files from writing files into it ( I have reasons to do so). But I've tried all the basic methods of doing so, from the command line using +R on the folder, but it refuses to stay in the read only mode. Basically what I'm trying to achieve is to prevent files being created on the temp folder. I don care about applications that would crash if it was denied access into it. In fact, I am testing what applications crash on making it read n

share|improve this question
    
Can you delete it can create a file named TEMP. (Which is not an answer but a work around which might serve your needs). –  Hennes Jul 20 '12 at 15:09
    
are you editing the permissions from the systems administrator account? –  Rhyuk Jul 20 '12 at 15:15
    
No, as a user. But isn't that enough since I am only modifying my own folder ? –  asudhak Jul 20 '12 at 15:23
    
@Hennes: I would love to try the work-around which you suggest, but unfortunately looks like there are some files in temp which are opened by other processes. I may need to find and close the handles first. –  asudhak Jul 20 '12 at 15:26
    
Booting from liveCD or putting the drive into an other computer (keeping the original drive int hat computers) would allow you to do so. A really hackish solution, but if you only want to try things once it will work. –  Hennes Jul 20 '12 at 15:30

1 Answer 1

The read-only property on folders (+R) does not do what you think on windows. See http://support.microsoft.com/kb/812003

Windows may also store customization information in ahidden Desktop.ini file in the folder. In this case, Windows sets the read-only attribute on the folder to instruct Windows to look for the Desktop.ini file. The read-only attribute does not prevent you from performing common file and folder tasks (such as copy, move, delete, and rename)

To truly make a folder read-only you need to be on a NTFS file-system and set the permissions on the folder instead which appear under the Security tab (right-click the folder and choose Properties from the menu then select the Security tab). Remove the Modify and Write permissions of each users and group listed from the folder and then no one will be able to write to it.

You may have to click Advanced > Change Permissions and uncheck "Include inheritable permissions ... " to clear SYSTEM permissions that are often inherited from the parent.

share|improve this answer
    
Can this be done as a regular user in WINXP? After all, it is the his folder that he wants to make read-only ? –  asudhak Jul 20 '12 at 15:52
    
Regular user as long as you are the Owner of the folder. If you are not the Owner you must change ownership which will require admin permissions. –  Ali Jul 20 '12 at 16:05

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.