chmod 2775 — rwxrwsr-x
What chmod 2775 allows, when to use it, and the calculator pre-filled with it — toggle any box to compare.
rwxrwsr-xrwxrwxr-xchmod 2775 filenamechmod -R 2775 /path/to/dirWhat this means
Owner can read, write, execute. Group can read, write, execute. Others can read, execute.
What chmod 2775 allows
| Who | Read | Write | Execute |
|---|---|---|---|
| Owner | ✓ | ✓ | ✓ |
| Group | ✓ | ✓ | ✓ |
| Others | ✓ | — | ✓ |
- • setgid (2): on a directory, new files inherit its group; on a program, it runs with the file's group.
Like 775 with setgid: a shared, group-writable folder where every new file automatically belongs to the team's group.
Commands
chmod 2775 fileset it on one file or directorychmod u=rwx,g=rwxs,o=rx filethe same thing in symbolic formchmod -R 2775 dir/recursively — careful: it applies to files and directories alikels -l filecheck the result: -rwxrwsr-x (a directory shows drwxrwsr-x)On a directory, read lets you list it, write lets you create and delete entries, and execute lets you enter it and open what's inside. That's why directories usually get 755 or 750 while files get 644 or 640.
Frequently asked
What does chmod 2775 mean?
Owner: read, write, execute. Group: read, write, execute. Others: read, execute. setgid (2): on a directory, new files inherit its group; on a program, it runs with the file's group. In ls -l it shows as rwxrwsr-x.
What is the symbolic form of chmod 2775?
chmod u=rwx,g=rwxs,o=rx file — it sets exactly the same permissions as chmod 2775.