Linux – How to chmod a directory to drwxr-sr-x?


How can I change a directory's permission to: drwxr-sr-x under linux?

Best Answer


chmod u=rwx,g=rx+s,o=rx /path/to/dir

Will give you lowercase s instead of uppercase S. The lowercase s bit on the group permission means that the directory is setguid. Any directory created in that directory will belong to the same group as its parents directory instead of the default group of the user that created it.