Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

SGID reset - chgrp command

$
0
0
My question is a general Unix/Linux question. Was not sure where to post it on dbforums so picked this forum. I hope someone can answer it.


Using regular id, ctginst1:

ctginst1@xxxxxxxx:/home/ctginst1> id
uid=213(ctginst1) gid=212(db2iadm1) groups=1(staff),204(db2grp1)


ctginst1@xxxxxxxx:/home/ctginst1> mkdir test; chgrp db2grp1 test; chmod 3775 test; ls -ld test
drwxrwsr-t 2 ctginst1 db2grp1 256 Oct 12 13:12 test


ctginst1@xxxxxxxx:/home/ctginst1> chgrp db2iadm1 test; ls -ld test
drwxrwxr-t 2 ctginst1 db2iadm1 256 Oct 12 13:12 test



Repeating chgrp using root:

ctginst1@xxxxxxxx:/home/ctginst1> mkdir test; chgrp db2grp1 test; chmod 3775 test; ls -ld test
drwxrwsr-t 2 ctginst1 db2grp1 256 Oct 12 13:18 test


root@xxxxxxxx:/home/ctginst1> chgrp db2iadm1 test; ls -ld test
drwxrwsr-t 2 ctginst1 db2iadm1 256 Oct 12 13:18 test


Why does SGID get reset when using a regular id but not when using root?

Viewing all articles
Browse latest Browse all 13329

Trending Articles