What is the difference between chmod 775 and chmod 2755?

migrated from serverfault.com Oct 23 '12 at 18:55

This question came from our site for system and network administrators.


from man chmod:

2000    (the setgid bit).  Executable files with this bit set will
        run with effective gid set to the gid of the file owner.
  • 1
    So, no effect on a non-executable file? What effect does it have on a directory? – Bruce Ediger Oct 23 '12 at 19:14
  • 6
    On some operating systems, the setgid bit causes files created in the directory to have the file gid set to the same one as the directory, rather than that of the gid of the process. Also, 27 7 5 means it's writable to all members of a group, not just the owner of the directory. – Random832 Oct 23 '12 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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