Owner can read, write and execute. Group can read, write and execute. Others can read and execute.
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | ✓ | ✓ |
| Group | ✓ | ✓ | ✓ |
| Others | ✓ | – | ✓ |
Typical use
Folders a group works in together.
Good to know
775 (rwxrwxr-x) lets the owner and group create, rename and delete files in a folder, while others can only list and enter it. It is common for shared project folders and writable app folders such as storage or uploads, where the deploy user and the web server share a group. Write on a folder means adding and removing entries, even files you don’t own.
Add the setgid bit with chmod 2775 so new files inherit the folder’s group instead of the creator’s primary group, and set umask 002 so they come out as 664 rather than 644; otherwise collaborators get “Permission denied” on each other’s files. To stop members deleting each other’s files, add the sticky bit as well, the way /tmp is set up.
Commands
| Set the mode | chmod 775 file |
|---|---|
| The same with letters | chmod u=rwx,g=rwx,o=rx file |
| A folder and everything in it | chmod -R 775 folder |
| Only the folders inside | find folder -type d -exec chmod 775 {} + |
| How ls -l shows it | -rwxrwxr-x |