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!

chmod Question

Status
Not open for further replies.

chomps303

MIS
Sep 30, 2003
83
US
drwxrwsrwx 6 user informix 512 Nov 03 2003 aa
drwxrwsrwx 7 user informix 512 Dec 01 2003 bb
drwxrwsrwx 8 user informix 512 Jan 12 2004 cc
drw-rwSrw- 2 user informix 512 Jul 05 05:00 dd
drw-rwSrw- 2 user informix 512 Jul 12 05:00 ee
drw-rwSrw- 2 user informix 512 Jul 19 05:00 ff

What is the small "s" and capital "S" in the permissions?

What would cause them to change from small to capital?

What would the chmod command be to get both?

Thanks

Brandt
 
doing 'man ls' yields the following:

s the set-user-ID or set-group-ID bit is on, and the
corresponding user or group execution bit is also
on

S undefined bit-state (the set-user-ID bit is on and
the user execution bit is off)

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
To expand on vlad's post:

>>> What is the small "s" and capital "S" in the permissions?

In this case it is the setgid permission. There are different reasons for using it on executable files and directories. The capital "S" indicates that the group's execute permission has been removed (when it should not have been).

>>> What would cause them to change from small to capital?

Someone (or some process) using chmod has changed the permissions of the directory.

>>> What would the chmod command be to get both?

To add the setguid permission:
chmod 2555 <file> (or chmod g+s <file>)

Please also note:
from Solaris Sys Admin I Course:

When a setgid permission is applied to a directory, files created in the directory belong to the group to which the directory belongs.
For example, if a user has write permission in the directory and creates a file there, that file belongs to the same group as the directory and not the user's group.

My guess would be that in the example you posted, directories dd ee ff should now have their permissions changed to be the same as aa bb cc

I hope that helps you.

Mike
 
The capital "S" indicates that the group's execute permission has been removed (when it should not have been).

Whether it should have been or not is immaterial to the large S. It merely means that execute permissions do not exist for group.

___________________________________
[morse]--... ...--[/morse], Eric.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top