ls output
ls results
-
setuid bit. Denoted by
s(directories) orS(files) in the permissions block oflsresults, it only applies to executable files — it just specifies which user (u+s) / group (ug+g) the process should run as when executed.To clear this bit, simply run
chmod -s yourfile.txt. -
sticky bit. Denoted by
torT(nots/S, due to setuid’s precedence), it’s usually used on directories to control a hierarchy of permissions. E.g., to share a temporary directory between users, but limit the control each user has on another user’s files in that directory.To clear, run
chmod -t tmp/. -
file acl. Denoted by a trailing
+(plus sign), you can show more details by callinggetfacl index.html.Clear the custom ACL settings with
setfacl -b index.html. -
selinux. Denoted by a trailing
.(dot),ls -Zwill show the full story.Remove this setting with
sudo setfattr -x security.selinux favicon.ico.(Oddly,
getfattr -d favicon.icodoes not do what it says it will do, i.e., print outsecurity.selinux="...", but it has a funny name, and explicity usinggetfattr -n security.selinuxworks, so perhaps we can forgive it.)It seems that
chcon(“change context”, likechmod“change modifiers”, for example), the dedicated tool for SELinux context configuration, cannot remove the file attribute.