Protecting Linux Files From Root: Mastering chattr and lsattr

Linux tutorial - IT technology blog
Linux tutorial - IT technology blog

rm -rf`

Final verification of paragraph 1:
`

Accidentally typing rm -rf is a classic nightmare for every Sysadmin. It takes only 1 second for a critical configuration file to vanish, but it could take you 2 hours to recover the system and explain the situation to your boss. Sometimes, the error doesn’t come from humans but from automated scripts or malware intentionally overwriting /etc/resolv.conf to change the server’s DNS.

`

Wait, I noticed the URL for `recover the system` has a space in the anchor text. That’s fine.
The URL is: `https://itfromzero.com/en/linux-vi-en/mastering-chroot-on-linux-from-sandbox-isolation-to-real-world-system-rescue.html`

Paragraph 2:
`

There is a common misconception: Root privileges are ultimate and can do anything. In reality, for professional system administration, we need a stronger physical lock. That is where chattr (Change Attribute) and lsattr (List Attribute) come into play.

Share: