Skip to main content

How to Protect Files From Deletion in Windows

deleteA novel way to protect important files on your hard disk is to prevent them from getting deleted accidentally. This can be done in an NTFS partition by setting appropriate access permission to that file or folder. This article will show you how to do that.

Method 1: Protect all files within a folder

The NTFS file permission dictates that users who are granted Full Control on a folder can delete any files in that folder regardless of the permissions that protect the file. Hence to protect files in a folder from deletion, it is essential to deny Full Control on that folder. Once that permission is revoked, all files within that folder are automatically protected from deletion without having to set permission for each file individually. The steps required to do this is described below.

1. Create a folder on the root of an NTFS formatted hard drive partition. If the folder which you want to protect already exist and is nested several folders deep, it is recommended to move this folder to the root of the partition.

2. Right-click on the folder and choose Properties.

3. Click on the Security tab and then click Advanced.

4. Click Change Permission, and on the next window highlight Administrator and click Edit

advanced-security-settings

5. Under Permission settings, check the boxes “Delete subfolders and files” and “Delete” under the Deny column.

permission-folder

6. Click OK on all opened windows until you have closed them all.

The folder is now protected. Under this folder you can create new files or edit existing files but you cannot delete them or rename them. Attempting to do so results in this File Access Denied message.

deny-delete

Method 2: Protect only selected files

This is somewhat difficult to achieve for reasons already explained – users who have full access to the parent folder can delete files regardless of the permissions that protect the file. So even if you deny Delete access to a file, if the parent folder is set to Full Access the user will be able to delete the file all the same. But there is one way by which we can workaround this problem.

1. Right-click on the file you want to protect and choose Properties.

2. Check the attribute “Read-only” and click Apply.

properties-read-only

3. Open the Security tab and click Edit.

4. Highlight the user name Administrator and check the box “Write” under the column Deny.

permission-delete-deny

5. Click OK on all windows to exit.

The file now cannot be deleted, but it cannot be edited or modified too. That’s an undesirable consequence of selectively protecting files.

Alternative Method: Use third party software

If working with file permission is too much for you, you can try System Protect – a freeware that prevents deletion of important system files as well as user-selected files. The program runs in the background just like an anti-virus program do and continuously monitors all access to the protected files. If any process tries to delete the files the user is alerted. The program can be configured to automatically deny all delete attempts or ask the user for action. Additionally, System Protect allows files and folders to be password protected.

system-protect

Comments

  1. Thanks the information is good and explanatory,
    Is it possible to rename the file whilst restricting the users from deletion of the files in a respective folder. By the above way we cannot delete or rename the files.

    ReplyDelete
  2. I try and:
    - i can create new files or subfolders
    - i can VIEW files
    - i can't delete or rename files

    But i can't edit!! Infact when i try to save files, system says i can't due to permissions.
    Any ideas?

    ReplyDelete
  3. actually i had transferred my Disk from FAT32 to NTFS so i don't have security tab what i do ?

    ReplyDelete
  4. How to protect file not to delete and copy from network shared folder. User will have only view option. Is it possible to do without 3rd party software

    ReplyDelete
    Replies
    1. Option for not to delete is when you share a folder you can chose the option of share as read only so that others can see the data but will not be able to delete it however copy option will still be available and for more security options it is better to use a server for file sharing

      Delete

Post a Comment

Popular posts from this blog

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

69 alternatives to the default Facebook profile picture

If you have changed the default Facebook profile picture and uploaded your own, it’s fine. But if not, then why not replace that boring picture of the guy with a wisp of hair sticking out of his head with something different and funny?

How to remove watermark from an image or picture

A watermark is any recognizable text, logo or pattern that appears over an image to identify the owner of the image and generally used to prevent unauthorized reuse of the image. Watermarks are usually transparent and can be difficult to remove. The difficulty or ease of removal depends on the content of the image and the position, color, size etc of the watermark.