chmod 775: Owner and Group Write, Everyone Else Reads
775 is rwxrwxr-x: the owner and every member of the owning group can read, write and execute, while everyone else can read and traverse but not change anything. It is the standard mode for a directory a team shares.
At a glance
- Octal
- 775, written 0775 in four digit form
- Symbolic
- u=rwx,g=rwx,o=rx
- On a file
- -rwxrwxr-x
- On a directory
- drwxrwxr-x
- Owner
- Read, write, execute
- Group
- Read, write, execute. Group membership becomes a trust boundary
- Others
- Read and execute. On a directory: list and enter, but not create or delete
In detail
775 is what you want when a set of people need to collaborate in one directory. Members of the owning group can create, edit and delete entries; everyone else can look but not touch. The mode moves the decision about who may write from the file system to group membership, which is where it belongs, because groups are managed and audited and a mode digit is not.
On its own it has a well known gap. A file created inside a 775 directory takes the primary group of whoever created it, not the group of the directory, so one careless member creates a file the rest of the team cannot edit. The fix is the setgid bit, giving 2775, which makes new entries inherit the directory's group automatically.
For files, 775 is usually wrong rather than dangerous. It marks a file executable for the owner, the group and everyone else, which is meaningless on a configuration file or a document and confusing in a listing. Data files in a shared directory want 664, and the directory itself wants 775 or 2775.
The security question to ask is not about the mode but about the group. If the owning group is a small team, 775 is fine. If it is a group that half the machine belongs to, such as users or staff on some systems, then 775 is functionally close to 777 and should be tightened to 750 with a purpose built group.
Note that others still get execute on a directory here, meaning any account can enter it and open a file inside if it knows the name. That is usually what you want on a path leading to public content, and clearly not what you want on a directory holding anything private, where 750 is the right neighbour.
Examples
chmod 775 /srv/project
chmod u=rwx,g=rwx,o=rx /srv/projectdrwxrwxr-x developers /srv/project
$ touch /srv/project/notes.md
-rw-rw-r-- alice alice notes.md # group is alice, not developers
# fix: setgid on the directory
chmod 2775 /srv/project
$ touch /srv/project/other.md
-rw-rw-r-- bob developers other.md # inherits the directory groupThings that catch people out
- 775 on a directory without setgid produces files the rest of the group cannot edit, and the symptom appears days later as a permission denied that nobody can reproduce.
- Setting 775 on files as well as directories is the usual result of a recursive chmod. Use find with -type d and -type f, or the capital X form, to keep the execute bit on directories only.
- A group that most accounts belong to turns 775 into effectively 777. Check the group membership before deciding this mode is tight enough.
- Some services refuse group writable configuration files. SSH in particular ignores a config or key whose mode is group writable, which shows up as an authentication failure rather than a permissions error.
Try it: Chmod Calculator
Tick the nine permission boxes, or type an octal or symbolic value, and get the three digit and four digit octal, the ls -l rendering and the exact chmod command back.
Chmod Calculator
LOCAL · Browser-OnlyCalculate Unix file permissions with an interactive chmod builder
Permission Matrix
| Entity | Read (4) | Write (2) | Execute (1) | Octal | Symbolic |
|---|---|---|---|---|---|
| Owner (u) | 7 | rwx | |||
| Group (g) | 5 | r-x | |||
| Others (o) | 5 | r-x |
Special Bits
Advanced permission flags for executables and directories
Generated Permissions
755rwxr-xr-x-rwxr-xr-xchmod 755 filenamechmod u=rwx,g=rx,o=rx filenamePermission Breakdown
Owner (u)
7rwx- - Read files / list directory contents
- - Write / modify / delete
- - Execute / traverse directory
Group (g)
5r-x- - Read files / list directory contents
- - Execute / traverse directory
Others (o)
5r-x- - Read files / list directory contents
- - Execute / traverse directory
Common Permissions Reference
| Octal | Symbolic | Meaning |
|---|---|---|
777 | rwxrwxrwx | Full access for everyone |
755 | rwxr-xr-x | Owner full, others read and execute |
750 | rwxr-x--- | Owner full, group read and execute |
700 | rwx------ | Owner full access only |
666 | rw-rw-rw- | Read and write for everyone |
644 | rw-r--r-- | Owner read/write, others read only |
600 | rw------- | Owner read/write only |
555 | r-xr-xr-x | Read and execute for everyone |
444 | r--r--r-- | Read only for everyone |
400 | r-------- | Owner read only |
Related File permissions
All file permissions →chmod 2775: The setgid Bit on Directories and on Files
2775 adds the setgid bit to 775 so new files inherit the directory's group. The fix for shared directories where the team cannot edit each other's files.
chmod 755: The Standard Mode for Directories and Programs
755 gives the owner full control and everyone else read and execute. Why it is right for directories and executables and wrong for ordinary data files.
chmod 664: Group Writable Files for Shared Work
664 lets the owner and the group edit a file while everyone else can only read it. The default on systems using a 002 umask and per-user groups.
chmod 750: Owner Writes, Group Reads, Others Shut Out
750 gives the owner everything, the group read and traverse, and everyone else nothing. The right mode for application directories that must stay private.
chmod 711: Directories You Can Enter but Cannot List
711 gives others execute without read, so they can enter a directory by exact name but cannot list it. Where this is used and what it does not protect.
chmod 733: Blind Drop Directories and What They Miss
733 lets others write and traverse a directory without listing it. The upload drop box pattern, and why it needs the sticky bit to be safe.
Tools for this
- Chmod Calculator Free online chmod calculator - calculate Unix file permissions with an interactive chmod builder