How to protect files from modification and deletion

A different way of protecting important files on Windows on your computer is to prevent them from being accidentally or accidentally deleted .
If in another article, dedicated to those who use only one computer in the family, I had written how to protect files and folders so as not to open them by other people, in this case we find instead the solution to the inverse problem, that is that they can be deleted by mistake . Not only can it happen that another person using the computer can delete important files but there may also be mistakes in deleting important data. On a PC affected by viruses and malware then there may be errors caused by missing system files that could be protected.
Let's see how to use permissions in Windows folders, when using an NTFS-formatted hard disk (as normal).
1) To protect all files within a folder and therefore prevent them from being deleted or modified, you must change the permissions of files and folders .
Normally, especially if you are an administrator, you have complete control over the created folders. Hence, to prevent files in a folder from being deleted, it is essential to deny complete control over that folder . Once the permission has been revoked, all the files it contains are automatically protected from deletion and there is no need to set specific permissions for each individual file.
To do this on Windows 10 and Windows 7 you need to create a folder and, even if the folder you want to protect already exists, move it to the root directory of the hard disk (to avoid inheriting permissions from the upper folders). Right click on the folder and choose properties, then go to the security tab and click on Advanced .
From the next window, click on Disability Inheritance and select the Convert inherited permissions option.
Now you can select the account with which you log in to Windows and click on " Change ".
In the permissions tab, at the top, change the Type line from Allow to Deny .
In the center, click the Show advanced permissions link, and select the rights to be denied. If you want to prevent deletion, select delete and Delete subfolders and files, to protect the folder or file from being modified, select Create File / write data and Create Folders / add data . In the end, OK on all windows to close them.
2) Only selected files can be protected so that they can never be deleted by mistake or by other people.
In this case Windows becomes rather complicated because, even by assigning permissions to individual files, they are overcome by the general permissions of the folder that contains them. So even if you deny the ability to delete a single file, if the root folder is set to full access, the user will be able to delete the file the same.
To solve this problem, right-click on the file to be protected, choose properties and, in the general tab, check that the " read-only " attribute is activated.
Click on Apply, go to the protection tab and click on Change
Highlight the user name you logged in to with Windows and check the " Write " box under the Deny column.
As before, press OK to close all windows.
The file cannot now be deleted and cannot even be edited .
3) An alternative method of preventing a file from being deleted is by using an external program.
If working with permissions is too complicated, you can try a free program called System Protect . It acts in the background, prevents the most important system files from being deleted and allows the user to choose the ones that should never be deleted, not even by mistake. It is mainly a security program that warns the user when some process tries to delete that file. The program can be configured to automatically reject all cancellation attempts or to make a request for intervention appear. System Protect also allows you to protect files and folders with passwords so that they cannot be opened.
In another article it is written how to delete the files in use and undeletable .

Leave Your Comment

Please enter your comment!
Please enter your name here