LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   set gid (https://www.linuxquestions.org/questions/solaris-opensolaris-20/set-gid-455396/)

linuxtesting2 06-16-2006 08:57 AM

set gid
 
Hi,

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


Ole

jlliagre 06-16-2006 10:45 AM

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).

linuxtesting2 06-18-2006 02:18 PM

hehe, thanks :)


All times are GMT -5. The time now is 09:31 AM.