Linux chattr command
The chattr command changes file attributes on a Linux file system. It provides a higher level of security on files and directories. You can also use this security to prevent important files from accidental deletion.
Syntax:
You can add any attribute to the file using the + symbol or use the – symbol to remove the attribute from the file.
Make File/Directory immutable
Use the +i option with chattr on file to make the file unchangeable, This will not allow making any changes in the file even to the root user.
Enable Append Mode Only
Use the +a option to set the file to append mode only. You can not option this for editing. We can only append content to the file.
0 Comments
CAN FEEDBACK
Emoji