Extended file attributes are another tool that can help you protect sensitive files. They won't keep intruders from accessing your files, but they can help you prevent sensitive files from being altered or deleted. There are quite a few extended attributes, but we only need to look at the ones that deal with file security.
First, let's use the lsattr command to see which extended attributes we already have set. On a CentOS machine, your output would look something like this:
[donnie@localhost ~]$ lsattr
---------------- ./yum_list.txt
---------------- ./perm_demo.txt
---------------- ./perm_demo_dir
---------------- ./donnie_script.sh
---------------- ./suid_sgid_files.txt
---------------- ./suid_sgid_files2.txt
[donnie@localhost ~]$
So far, I don't have any extended attributes set on any of my files.
On an Ubuntu...