chmod 750
rwxr-x---Safe when used as intended
Owner can do everything; group can read and execute; others have no access.
750 is 755 with the outside world shut out. The owner has full access, members of the group can read and enter, and everyone else gets nothing.
It's a good default for application directories that a service group needs to read but other users have no business seeing. Ubuntu switched new home directories to 750 in 21.04 for the same reason.
Permission by permission
| Who | Read | Write | Execute | Digit | Means |
|---|---|---|---|---|---|
| owner | ✓ | ✓ | ✓ | 7 | read, write and execute |
| group | ✓ | — | ✓ | 5 | read and execute |
| others | — | — | — | 0 | no permissions |
- In
ls -l:-rwxr-x---for a file,drwxr-x---for a directory. - Symbolic form:
u=rwx,g=rx,o= - New directories get this mode when the umask is
027.
Use it for
- Application directories read by a service running in the owner's group.
- Home directories on shared machines.
- Deploy directories where the web server's group needs read access only.
Avoid it for
- When the web server isn't in the group it will get 403 Forbidden — add it to the group, or use
755. - Regular files: use
640.
Commands
chmod 750 path
set this mode on a file or directory
chmod u=rwx,g=rx,o= path
the same, written symbolically
find path -type d -exec chmod 750 {} +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 | 5 | |||
| others | 0 |
The owner can read, write and execute; the group can read and execute; everyone else can do nothing.
chmod 750 file
chmod u=rwx,g=rx,o= file
Frequently asked questions
750 vs 755?
Others. With 755 any user can list and read; with 750 only the owner and the group can.