Visit Jeremy's Blog.
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.


  Search this Thread
Old 06-16-2006, 08:57 AM   #1
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Rep: Reputation: 30
set gid


Testing out setting user and group id on files and folders...and then i have a question

root@kkk {/home/ole] #mkdir test
root@kkk {/home/ole] #chmod 0000 test/
root@kkk {/home/ole] #chmod 2000 test/
root@kkk {/home/ole] #ls -l
d--------- 2 root root 512 Jun 16 15:51 test <-- why isnt it --S for the group when i have set gid. I can change it with letter but not with number...why is this ?

root@kkk {/home/ole] #chmod 4000 test/
root@kkk {/home/ole] #chmod g+s test/
root@kkk {/home/ole] #ls -l
d--S--S--- 2 root root 512 Jun 16 15:51 test

if i use this on a file its ok, but is there another number for dir ?

Thanks for helping

Old 06-16-2006, 10:45 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,705

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Solaris manual pages usually worth reading, chmod one states:

Note that the setgid bit cannot be set (or cleared) in abso-
lute mode; it must be set (or cleared) in symbolic mode
using g+s (or g-s).
Old 06-18-2006, 02:18 PM   #3
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Original Poster
Rep: Reputation: 30
hehe, thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
mounting an iso9660 with uid and gid set to user cwin Linux - Software 3 12-22-2004 05:45 PM
Urgent help required for set UID/GID Permission Linux_interest Linux - Newbie 2 09-15-2004 08:27 AM
How do i find all the set UID/GID file on my current system Linux_interest Linux - Newbie 1 09-13-2004 10:09 AM
Changing GID in X dxdad Linux - Software 2 03-22-2004 08:45 AM > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration