Mailing List Archive

Support open source code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mailbox locking

>>>>> "Viktor" == Viktor Pavlenko <> writes:

    Viktor> Can anyone shed some light on s (=sgid+x) and S (=sgid-x)
    Viktor> things?

becomes the gid of the owner"???

suid = Set User ID.  This means the effective user of the process is
set to the owner of the executable file, and the process has the same
permissions that the file owner has for the purpose of checking the
user mode.

sgid = Set Group ID.  Same as suid except substitute group for owner.

These are pretty meaningless if x is not set, but for orthogonality's
sake you can do chmod 2666 file if ya really wanna.

On some systems, you can do chmod 1nnn.  This is called the "sticky"
bit, and that is the one that calls for mandatory locking.

When these are directories, they have different meanings.  An "suid"
directory is meaningless (IIRC), an sgid directory means "use my
permissions as default when you create children in me", and a
directory with the sticky bit set restricts certain directory
manipulations to the owner of the directory or file.

Look up stat(2).  (No, chmod(2) isn't a lot of help, and chmod(1) is
only a little bit more.  ;-)

Info may be better than man.

University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links