chmod 775: what it means and when to use it
chmod 775 gives the owner and the group full access, while everyone else can read and execute.
775
rwxrwxr-x
| Who | Digit | Read | Write | Execute |
|---|---|---|---|---|
| Owner | 7 |
Yes | Yes | Yes |
| Group | 7 |
Yes | Yes | Yes |
| Everyone else | 5 |
Yes | No | Yes |
How chmod 775 works
The two 7s give read, write and execute to the owner and to the group. The final 5 lets other users read and enter, but not change anything. In symbolic notation, this is <code>rwxrwxr-x</code>.
775 is built for team collaboration on shared Linux servers. For example, if your web server (<code>www-data</code>) and your deployment user are in the same group, setting an uploads or cache folder to 775 lets both accounts create and edit files without exposing write access to the general public.
Where 775 belongs
- Shared project and code directories
- Web server upload, cache, and asset folders
- Git repositories shared across a local team
The command
Both of these set exactly the same permissions. The number is shorter; the letters are easier to read back later.
chmod 775 filename
chmod u=rwx,g=rwx,o=rx filename
775 only helps if the right users are in the group. Check the owner and group with ls -l and configure them with chgrp first.