Skip to content

Instantly share code, notes, and snippets.

@fduran
Created February 20, 2012 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fduran/1870460 to your computer and use it in GitHub Desktop.
Save fduran/1870460 to your computer and use it in GitHub Desktop.
Linux protecting critical directories
# protecting critical linux directories my making them immutable
# www.fduran.com
chattr +i dir
# system dirs to protect:
/sbin
/bin
/usr/sbin
/usr/lib
# also a tar of /etc/
# remove immutability by 'chattr -i dir' before installing programs or packages (apt-get/yum install etc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment