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?
Set group ID bit. (setgid)
Unfortunately, the assholes at the FSF refuse to
put the full documentation for chmod in the man page,
so you have to use the cumbersom and confusing
(for non-emacs users) info system. I recommend
using pinfo instead, as it's not quite as bad
as info.
pinfo chmod # for more information
see also
pinfo coreutils # and go to the section
# titled File Permissions
# then look at "Mode Structure"
# and "Numeric Modes"
# you can also look at Symbolic
# modes, but this mechanism is
# not always available on
# various *nix systems.
Here's the important part -- a file's "mode"
is the Logical-OR of the following values:
Mode Corresponding Permssion
Bit
User who owns file (u)
0400 Read (-r--------)
0200 Write (--w-------)
0100 Execute (---x------)
users in file's group (g) (see /etc/group)
0040 Read (----r-----)
0020 Write (-----w----)
0010 Execute (------x---)
Other users not in file's group (o)
0004 Read (-------r--)
0002 Write (--------w-)
0001 Execute (---------x)
Special Permissions
4000 Set USER ID on execution (---S------)
2000 Set GROUP ID on execution (------S---)
1000 Sticky Bit (t) (---------t)
For DIRECTORIES:
=== regular permissions ===
read permisission ability to list contents (/bin/ls )
write permission ability to create and remove
files in directory.
execute permission give the ability to
change directory (cd) into
the directory.
=== special permissions ==
Set User ID SETUID has no effect on directories.
Set Group ID on some systems, no matter what
creator specifies, all files in
directory have the same group
as the directory with SETGID set.
sticky bit Only a file's OWNER can remove
said file from the directory
(rm or rmdir)
-rwxr-Sr-t 1 root root 25016 Nov 6 11:38 temp.txt
-rw-r--r-- 1 root root 9622 Mar 19 2005 generic
Set Group ID (SETGID) for a text file is meaningless.
Also, putting .txt on the end of a file is equally
meaningless on anything other than M$ systems.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]