account permissions.
William F. Acker WB2FLW +1-303-777-8123
wacker at octothorp.org
Thu Apr 26 00:08:14 EDT 2001
Hi, Geoff,
The bit represented by the letter S to which you refer is actually
called the setuid bit if it's at the end of the first field, and the
setgid bit if it's at the end of the second field. I've never seen
it in the third field. The sticky bit is for preventing someone other
than root or the owner of the file from deleting it if the directory where
it resides has the sticky bit set. Two directories that come to mind are
/tmp and /var/spool/mail. The bit is represented by a T, and I've only
seen it in the last field. You can set it by prefixing a 1 to the mode.
For example, chmod 1777 /tmp.
HTH.
Bill in Denver
On Wed, 25 Apr 2001, Geoff Shang wrote:
> On Sun, 22 Apr 2001, Gregory Nowak wrote:
>
> > I thought you could use letters as well with chmod where - means no
> > permision, and + before the letter means permision.
>
> You can. To do this, you need to specify permissions like so:
>
> chmod <entity><operator><permission> file
>
> Where:
> Entity can be U for user, G for group, O for other, or A for all
> Operator can be plus, minus or equals
> Permission can be R W X or S
>
> I like this way of doing things, as you can pretty easily tell what you're
> doing.
>
> You can specify more than one of these by placing a comma between them.
> For example:
>
> chmod u=rwx,go=rx /usr/bin/lame
>
> or the same command written another way:
>
> chmod a=rx,u+w /usr/bin/lame
>
> You will also see there that you can use any number of either of the
> fields.
>
> Note also that multiple commands are enacted sequentially. For example,
> you could give read and write permission to only the user by doing:
>
> chmod a-rwx,u=rw .fetchmailrc
>
> Though of course, 'chmod go-rwx,u=rw' or even 'chmod go=,u=rw' would work
> just as well.
>
> The S is the sticky bit. For user it says that the file should
> be assumed to be accessed by the current user, not by the actual user. For
> example, if I have a program that I, as root, do a "chmod u+s" on, that
> program will look like it's being run by root, rather than the user that is
> actually running it. Needless to say, this is not something one does
> lightly. I'm not sure of what the sticky bit does for the other 2 fields,
> consult the chmod manpage for more on this.
>
> Geoff.
>
>
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
More information about the Speakup
mailing list