Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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.