On Tue, 2008-06-17 at 09:58 +0530, Bharathi Subramanian wrote:
> One Day One GNU/Linux Command
> =============================

I think some mention should be made about the 'other' modes, namely the
sticky bit and the setuid bit.

chmod +t dir - Set the sticky bit for a directory. -t is to remove the
same
chmod [u,g]+s file - Set the setuid bit for a file. -s is to remove the
same.

Note that all the above examples (Bharathi's) with mode numbers like
755, were implicitly 0755. If you use 1755 or 2755, you activate the
sticky bit or the setuid bit respectively. 3755 activates both.

The sticky bit allows only the owner to remove the file, though access
is allowed as per the remaining permissions. I've only seen it used on
the /tmp directory, and a few other places where it shouldn't have
been :-P.

The setuid (or guid) bit allows the program to run under a different
user (or group). Ex:
-rwsr-xr-x  1 root   root    22904 Apr 27  2003 /bin/su
when su is run (by anyone), it has the same access rights as the root
user. (as seend by the s instead of an x).

HTH
-- 
Arun Tejasvi Chaganty (vimzard)
GNOME GSoC Student
Blog: http://arunchaganty.wordpress.com

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
To unsubscribe, email [EMAIL PROTECTED] with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to