Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > What does this permission mean rwsr-sr-x?

What does this permission mean rwsr-sr-x?
Thread Tools
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Aug 30, 2004, 03:31 PM
 
What are the s's? Is that setuid root? If so, how do I remove or re-add it?
     
absmiths  (op)
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Aug 30, 2004, 04:30 PM
 
I figured this one out with the man page. The s is the setuid bit for that group (either owner or group, but not world I think).

Anyway, you set it by adding 4000 to the permission for owner setuid or 2000 for the group setuid.

E.G., chmod 755 looks like this:

-rwxr-xr-x

chmod 4755 looks like this:
-rwsr-xr-x

and chmod 2755 looks like this:
-rwxr-sr-x

For some reason, 4666 and 2666 are legal modes even though the file is not executable. chmod 4666 and 2666 look like this, although it seems contradictory:

-rwSrw-rw-
-rw-rwSrw-
     
EmmEff
Dedicated MacNNer
Join Date: Jul 2004
Location: Ontario, Canada
Status: Offline
Reply With Quote
Sep 2, 2004, 11:21 AM
 
Another trick is:

chmod u+s <filename>

for adding the setuid bit without changing the existing (other) permissions.

Or:

chmod g+s <directory>

for adding the setgid bit.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:47 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,