chmod 775
rwxrwxr-xUse with care
Owner and group can do everything; others can read and execute.
775 is 755 with write access added for the group. Everyone in the file's group can create, rename and delete entries in the directory, while other users can still list and enter it but not change anything.
It's the usual mode for directories that a team — or a user and a service — maintain together.
Permission by permission
| Who | Read | Write | Execute | Digit | Means |
|---|---|---|---|---|---|
| owner | ✓ | ✓ | ✓ | 7 | read, write and execute |
| group | ✓ | ✓ | ✓ | 7 | read, write and execute |
| others | ✓ | — | ✓ | 5 | read and execute |
- In
ls -l:-rwxrwxr-xfor a file,drwxrwxr-xfor a directory. - Symbolic form:
u=rwx,g=rwx,o=rx - New directories get this mode when the umask is
002.
Use it for
- Project directories shared by a group of developers.
- Folders that both a deploy user and the web server's group must write to.
- Combined with setgid (
2775) so new files inherit the directory's group.
Avoid it for
- If others shouldn't even see the contents, use
770. - Files usually don't need execute: use
664for shared files that aren't scripts.
Commands
chmod 775 path
set this mode on a file or directory
chmod u=rwx,g=rwx,o=rx path
the same, written symbolically
find path -type d -exec chmod 775 {} +apply it to every directory in a tree, leaving the files alone
stat -c '%a %A %n' path
check the current mode on Linux (macOS: stat -f '%Lp %Sp %N' path)
Try variations
| Who | read | write | execute | Digit |
|---|---|---|---|---|
| owner | 7 | |||
| group | 7 | |||
| others | 5 |
The owner can read, write and execute; the group can read, write and execute; everyone else can read and execute.
chmod 775 file
chmod u=rwx,g=rwx,o=rx file
Frequently asked questions
What's the difference between 775 and 755?
Group write. With 775 group members can add, change and delete files in the directory; with 755 only the owner can.
Should I use 775 or 2775 for a shared folder?
2775. The setgid bit makes new files and subdirectories inherit the folder's group, so everything stays shared instead of taking on each creator's personal group.