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

On my computer running Windows XP Pro SP3 I have a folder on my desktop that is very important. How can I lock it so that I can alter anything in it, but the folder itself cannot be removed without resetting a (lock/unlock?) switch?

share|improve this question
Your folder is obviously not that important if the only copy you have is on the desktop of a single computer. You should always assume that your data will be completely unrecoverable the next day, and plan as you would if that were to be the case. – AttackingHobo Apr 17 '11 at 0:15
Where does it say I don't have it backed up? – Xavierjazz Apr 17 '11 at 2:19
I assumed that a person who wants to keep a folder from being deleted because it is important, that the person doesn't have backups, because if any of my important folders are deleted, I would just restore from backup. – AttackingHobo Apr 21 '11 at 0:44
This is no answer or help. Did you read the question? – Xavierjazz Apr 21 '11 at 14:21
And because it is not an answer or help I put it in a comment instead of an answer. – AttackingHobo Apr 21 '11 at 18:40
up vote 16 down vote accepted

You can set the "Delete" and "Delete subfolders and files" permissions to "Deny" under Properties → Security → Advanced.


share|improve this answer
This requires XP Pro and will not work on the popular Home version. – paradroid Apr 16 '11 at 21:29
You would still be able to access this menu by booting Windows XP Home Edition into Safe Mode. Since you only need to make the change once, it wouldn't be too much of a hassle. – nhinkle Apr 16 '11 at 21:30
@Xavier: 1) It's not different, I just didn't include the username prompt. You can use "Everyone" as a name. – grawity Apr 16 '11 at 22:05
@Xavier: 2) Yes. – grawity Apr 16 '11 at 22:06
@paranoid: Try seeing if changing the SharingWizardOn value in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced will get you the screen in normal boots. – Mehrdad Apr 17 '11 at 0:10

I'm afraid this is not possible.

Either you remove write permissions, and then it's read-only, or you allow writes and then it is also possible to delete (since this is considered as a write operation).

What I'd recommend if you have very important data is that you back it up, either locally or to be safer on a remote location; one good and easy option to achieve that would be to register for a dropbox account - that will allow you to recover the files if they happen to be deleted, and if you only use up to 2GB of data it is completely free.

Edit: For Windows (I read a bit too promptly), it is indeed possible to specify the permissions in a more fine-grained manner in the Security settings of the folder/files. You can not prevent an admin to assign itself the delete permissions though. In any case, if you're afraid of someone else deleted the files, I'd say a backup is still recommended. And if you're afraid of accidentally deleting the files.. Well back it up either way :)

share|improve this answer
Thank you for your suggestion (+1) and response. This file is much too large to be "clouded" freely. I suspect you are correct, but I will wait a while before I accept your answer, just in case. Regards. – Xavierjazz Apr 16 '11 at 21:14
Re "it is also possible to delete (since this is considered as a write operation)": This may be true for POSIX, but not for NTFS, which has distinct "create folders", "create files", "delete" and "delete child" permission bits. – grawity Apr 16 '11 at 21:20
Also, "Deny" permissions do apply to administrators. (However, administrators can always take ownership of any object, and the object's owner can always read and change the object's permissions.) Nevertheless, +1 for making a backup. – grawity Apr 16 '11 at 21:29
@grawity: Fair enough. I just glared at the basic permissions and forgot to check the detailed list. Thanks for correcting. – Seldaek Apr 16 '11 at 21:29
If you're just trying to prevent accidental, non-malicious deletion, Grawity's answer will work fine, and it is completely possible. Obviously, if somebody is trying to delete the file and has admin access, there would be a way to do so, note he says "without resetting a (lock/unlock?) switch". – nhinkle Apr 16 '11 at 21:32

You must log in to answer this question.

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