---

Files and Attributes: chattr

“The syntax is

chattr +option filename and options can be reversed with
-option.

“+i: Makes a file immutable: even root can’t alter it. This is
useful to protect against accidentally altering particularly
important files.

“+a: Sets files such that they can only be appended to, not
overwritten. If you set this for your logfiles, if an attacker gets
access to the machine, they can’t rewrite the logs to hide the
breakin.”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis