Saturday, August 11, 2012

Protect files from being deleted

  1. To test this create a test.txt file on you desktop.
  2. Now, to protect this file, right-click the file and choose Properties.
  3. On the Security tab, click Advanced.  The 'Advanced Security Settings for test.txt dialog options.
  4. Click the Change Permissions... button.
  5. Click the Add... button, and type "everyone" (no quotes) into the box, then click OK.  A 'Permission Entry' dialog appears.
  6. Scroll to the bottom.  Place a checkmark in the 'Deny' column for "Delete".  Do not add any other checkmarks.
  7. Turn on (checkmark) the option at the bottom called 'Apply these permissions to objects and/or containers within this container only', then click OK.
  8. Turn on (checkmark) the option at the bottom called 'Replace all child object permissions with inheritable permissions from this object', then click OK.
  9. All done. Your file is now password protected. No one, not even you (the creator) can delete this file, on purpose or by accident.
  10. Remember, the same thing applies for a folder.
  11. Windows will set the deny permission on every file and subfolder under this folder, unless you have set up one to not inherit permissions from its parent (you probably haven't done that). 
Note: Deny permissions take precedence over allow permissions, so no one will be able to delete any file until/unless this permission item is removed.  This will block other apps from being able to delete either (for example, the Photo Gallery or Media Center).

A special thanks to Shawn B Keene [MVP] for the above information.

No comments: