
chattr is a command in the Linux operating system that allows a user to set certain attributes on a file residing on many Linux filesystems. chattr prevents accidental deletion or change of files and folder. You cannot delete the files secured via chattr attribute even though you have full permission over files. This is very useful in system files like shadow and passwd which contain all user related information.