Monday, January 16, 2012

A folder not to be deleted on Debian Linux

By default, I can delete a file or folder which I created.

To prevent any accidental deletion of a folder or file, I can set the permission of the folder containing this folder to "Access files" instead of "Create and delete files".

I see these options by right-clicking on a folder or directory and choose "Properties". Then, I choose "Permissions". I see the "Folder access" field. I can select "Access files" instead of "Create and delete files". At this point, the folder or file in it cannot be deleted.



To revert back to the original situation, that is, the folder or file can be deleted, choose "Create and delete files".

Here is a directory called "recipe". It contains the "my1stRecipe" folder and the "my2ndRecipe.txt" file.


Below is a chart for explanation:




Right-click on "recipe" and choose "Properties".


I select "Permissions" to view the permissions.


I am the owner of this folder or directory of "recipe". My current permission for the folder is "Create and delete files".




I choose "Access files" and click on "Close".



Now, I cannot delete the "my1stRecipe" folder. I cannot delete the "my2ndRecipe.txt" file. When I press the delete key after selecting this folder or file, nothing happens.







No comments: