1

There seems to be a lot of half formed and incorrect explanations of how to properly set up permissions to prevent the deletion of a folder and all of its contents. Which is exactly what I am trying to do, so my question is: How can I prevent the deletion of a folder and all of its contents, in windows 10.

Some Background Research: Here is an answer that claims that setting both the folder and its contents to deny delete will solve the problem - Verified not Working
Here is another answer that claims that to prevent the deletion of files you must deny write on the parent folder - Verified not Working

Now, I could try removing all other permissions. I could change Administrator and my user account and restrict them to simply reading and executing. But then, I am worried about how I would ever be able to change the file permissions after that. As theoretically that should "brick" the files and make changing their permissions impossible.

0

1 Answer 1

2

Right Click > Properties > Security > Advanced > Add > Deny - Everyone (Delete and Delete subfolders and files)

This will prevent the folder and all of its contents from being deleted, even if you try to initiate a delete further up the folder hierarchy. And any files created or moved to the folder will automatically be granted these same permissions.

Delete by itself, does not really work in any logical and explainable way. It seems to be able to be overruled by other permissions. As it is possible to get the same result as both of them with just delete if you massively trim back the permissions you allow other users and change the ownership of the main folder.

1
  • This won't prevent the file being zero-filled, however.
    – T. Sar
    Commented Apr 26, 2017 at 11:55

You must log in to answer this question.

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