Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm used to setting up SGID on a directory

chmod -R g+s example and then
chmdo -R 750 example

And have the directory and all sub-directories preserve the set-group-ID. On CentOS SGID gets overridden by the second command.

The OS is CentOS release 5.6 (Final)

In theory, and like it says on this page, "if commands like chmod routinely cleared these bits on directories, the mechanisms would be less convenient..." and it's exactly whats happening. chmod -R 750 is effectivelly removing the SGID.

How can I make g+s permanent?

share|improve this question
    
setgid and sticky are two different things. –  Ignacio Vazquez-Abrams Jun 13 '11 at 0:46
    
@Ignacio, gonna look it deeper. Right now just corrected it so other's don't get confused. Thanks! –  Frankie Jun 13 '11 at 0:51

1 Answer 1

up vote 2 down vote accepted

Use 2750 with chmod instead.

share|improve this answer
    
thks for your reply. Using 2750 would work but it doesn't make it permanent. As soon as I do something like chmod -R 640 it overrides the sticky bit. On Fedora I never had this problem... –  Frankie Jun 13 '11 at 0:50
1  
Fedora has a newer version of coreutils. –  Ignacio Vazquez-Abrams Jun 13 '11 at 0:56
    
that's it. CentOS is using quite an old version of coreutils. Thanks for catching this one! –  Frankie Jun 13 '11 at 1:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.