Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Question

What is the difference between "chmod 775" and "chmod 2755" ?

share|improve this question

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

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

1 Answer 1

up vote 9 down vote accepted

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.
share|improve this answer
    
So, no effect on a non-executable file? What effect does it have on a directory? –  Bruce Ediger Oct 23 '12 at 19:14
3  
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

 
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.