Sometimes you delete important files and folders accidentally and are not able to recover them. For this Linux has a great capacity to secure your valuable information by making ur files immutable which even root user cant delete.
Linux ships with a tool called chattr which can be used for this purpose.
To make your “MyFolder” immutable use the following command,
# chattr +i MyFolder
After successfully completing the command, your folder will become immutable and even the root user will not be able to delete the folder. To change its mode so that you can remove it, use the below command,
# chattr -i MyFolder.