On Tuesday 06 November 2007 11:48, James D. Parra wrote: > Hello, > > Out of curiosity, what is the S for in, -rwxr-Sr-t? Is that a sticky > bit and id so, how is it set with chmod? > > -rwxr-Sr-t 1 root root 25016 Nov 6 11:38 temp.txt > -rw-r--r-- 1 root root 9622 Mar 19 2005 generic > > Thank you,
Patrick's generic and universal answer notwithstanding, the particular 'S' flag you showed is the "set group ID" bit. That means that if executed, the resulting process would execute with an effective group ID equal to that of the file's group ID (in this case, "root," or it's numeric counterpart). There's a corresponding "set user ID" bit which would put the 'S' signifier in the corresponding user position: % chmod g-s temp.txt % chmod u+s temp.txt % ls -l temp.txt -rwSr--r-t 1 root root 25016 Nov 6 11:38 temp.txt The capital 'S' is used when the corresponding execute bit is _not_ set. When the corresponding execute bit _is_ set, you get a lower-case 's'. In general, set-UID or set-GID have no real significance if the file to which they're applied is not executable. There is a "sticky" bit, but its meaning is quite different. I'll leave it as an exercise for you to discover that one (extra credit for the now-obsolescent original meaning). > James Randall Schulz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
