Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File permissions with capital "S" why ? 1

Status
Not open for further replies.

wpdavids

IS-IT--Management
Jan 31, 2001
60
US
I need to change the file permissions and ownership on a directory and above the directory. after the change the directory had permissions for other with a capital "S". What does that mean and why did this happen ?

example:

drwx--S--- 2 oracle dba 1024 Feb 15 00:14 export
drwx--S--- 2 oracle dba 1024 Feb 15 10:14 arch

Changed these directories using "chmod 700 *" and this happened.
 
My guess is the way you did the chmod......?
the chmod command.
suid = 4
sgid = 2
link = 1

To add the suid permissions to the preceding example, the command is:
chmod 4764 <file_name>
or chmod 2764 <filename> for the group ID?
to remove
if the sgid bit is set on a directory, the symbolic mode must be used to unset it:
chmod g-s <file_name> or chmod g-S <file_name>


-------------------------------
s Not used in the owner position. For the group
position, this becomes the group inheritance bit (SGID).
Any files created in this directory have the same group
as the directory entry. In AIX, when a new filesystem is
created, this bit is set by default. This also means the
search (x) bit is set for the group.

S Same as the lowercase s but means the search
(x) permission is not set for the group.

SETUID Behavior in AIX

A fix for a potential security risk dealing with the use of the SETUID and SETGID
permission bits on shell scripts was included in AIX 3.1.7 (which corresponds
to update level 2007). Prior to 3.1.7, when a shell script was
executed whose permissions included the SETUID bit (set user-id), the shell
script ran with the permissions of the shell script's owner. Similarly, if the
SETGID bit (set group-id) was set, the shell script ran with the permissions of
the shell script's group. Beginning with AIX 3.1.7, the SETUID and SETGID
permission bits are no longer supported for shell scripts. This change
does NOT affect compiled programs.


 
Thanks everyone. I used chmod g-s <file_name> to unset the setgid, which worked. It removed the capital &quot;S&quot; from the file permissions. I know lowcase &quot;s&quot; is a setgid permission, but never saw a capital &quot;S&quot;. I don't know how this appeared in the file permissions, but I was able to change it back to normal permissions.

aixqueen : great explanation

Thanks again..



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top