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 Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

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.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used: