search
top

How to lock down files in Linux using chattr

As system admins there is always a few trouble users that keep changing files we don’t want them to, such as /etc/resolv.conf. We can do that using the chattr command. Here is the file with no flags using the lsattr command. lsattr – list file attributes on a Linux second extended file system $ lsattr resolv.conf -------------e- resolv.conf So lets lock down the file using -i (immutable) so... read more

top