chmod 750: Owner Writes, Group Reads, Others Shut Out
750 is rwxr-x---: the owner has full control, the owning group can read and traverse, and all other accounts are refused entirely. It is the standard mode for an application directory that a service must reach but the rest of the machine must not.
At a glance
- Octal
- 750, written 0750 in four digit form
- Symbolic
- u=rwx,g=rx,o=
- On a file
- -rwxr-x---
- On a directory
- drwxr-x---
- Owner
- Read, write, execute
- Group
- Read and execute. On a directory: list and enter, but not create or delete
- Others
- Nothing. Cannot list, cannot enter, cannot open by exact path
In detail
750 is the mode that makes the two account model work: a deploy user owns the tree and can change it, a service group can read and traverse it to run the application, and no other local account can even list what is there. It is the natural pair to a directory owned by something like deploy:www-data.
The zero for others is doing real work. Without the execute bit, an account outside the group cannot traverse into the directory even to open a file whose exact name it already knows, so 750 stops path guessing dead. That is a meaningfully stronger position than 755, where any account can read every file it can name.
The failure mode is specific and common: the service is not actually in the group. A web server running as one user against a tree owned by deploy:deploy gets a forbidden response, and because the request never reaches the application, the application logs show nothing at all. Check the group membership of the running process before touching the mode again.
Every parent directory matters here too. A 750 directory inside a 755 tree is private; a 755 directory inside a 750 tree is not reachable by anyone outside the group, no matter how open the inner directory is. Permissions are evaluated at every step of the path, and the tightest step wins.
For files inside such a tree, 640 is the matching mode: owner read and write, group read, others nothing. Keeping directories at 750 and files at 640 is a clean and defensible layout for an application that holds configuration with credentials in it.
Examples
chmod 750 /srv/app
chmod u=rwx,g=rx,o= /srv/appThe empty right hand side of o= is how you clear a class completely in symbolic form.
drwxr-x--- deploy www-data /srv/app/
-rw-r----- deploy www-data /srv/app/.env
-rwxr-x--- deploy www-data /srv/app/bin/worker
The web server user is in www-data, so it can traverse and
read. Any other local account gets permission denied at the
very first step.Things that catch people out
- A forbidden response from a web server against a 750 tree is almost always group membership, not the mode. Confirm which user the server runs as, then confirm that user is in the owning group, and remember the process must be restarted to pick up a new group.
- 750 on the deepest directory does nothing if a parent is 700 and owned by someone else. Check the whole path with namei -l, which prints the mode of every component.
- Setting 750 on files makes them executable by the owner and the group for no reason. Files in a 750 directory generally want 640.
- Adding a service account to a group grants it access to everything that group owns, not just this tree. Prefer a group created for this application over reusing a broad system group.
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 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 640: Configuration Files a Service Group Can Read
640 gives the owner read and write, the group read only, and everyone else nothing. The correct mode for configuration holding credentials.
chmod 700: Private Directories Such as ~/.ssh
700 gives the owner read, write and execute and everyone else nothing. Why SSH insists on it for ~/.ssh and what breaks when a parent is more open.
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.
chmod 766: A Mode That Is Almost Always an Accident
766 gives the owner execute and leaves the file writable by the group and by everyone else. Why it combines two errors and what was probably intended.
Tools for this
- Chmod Calculator Free online chmod calculator - calculate Unix file permissions with an interactive chmod builder