Deny Deleting a folder on Windows

Problem

Setting the Deny Delete NTFS permission on a folder in Windows still allows me to delete it.

The Story

Today I had a tricky issue. For some reason, when I deleted a movie, the parent directory also got deleted, which happened to be the root Movies folder. The data wasn’t lost because it was a mounted NTFS Volume, so I could just remount it, but I kept wondering how to prevent this from happening again. I was expecting that setting Deny Delete to Everyone would prevent deleting the folder. However, this wasn’t the case, even with that permission set, the folder could still be deleted.

Solution

After some trial and error, I found the following to work:

Set the following permissions on the folder that you want to protect from deletion (in my case it was the Movies folder); leave the other permissions unchanged:

  • Deny Delete
  • Deny Delete subfolders and files
  • Apply to: This folder only

jpg


Originally posted to: http://www.thesysadminhimself.com/2012/12/deny-deleting-folder-on-windows.html

Updated:

Comments