devkult_
tools29converters34

chmod 770

rwxrwx---Safe when used as intended

Owner and group can do everything; everyone else has no access.

770 grants read, write and execute to the owner and the group, and nothing at all to anyone else. Other users can't list, enter or read anything in the directory.

It suits directories shared by a defined set of users or services that should stay invisible to the rest of the system.

Permission by permission

WhoReadWriteExecuteDigitMeans
owner✓✓✓7read, write and execute
group✓✓✓7read, write and execute
others———0no permissions
  • In ls -l: -rwxrwx--- for a file, drwxrwx--- for a directory.
  • Symbolic form: u=rwx,g=rwx,o=
  • New directories get this mode when the umask is 007.

Use it for

  • Private team directories on a shared server.
  • Data directories shared between an application user and a helper service in the same group.

Avoid it for

  • Web content the web server must read while running as a different, non-member user — it will get 403 Forbidden.
  • Files that aren't programs: use 660 so they aren't executable.

Commands

chmod 770 path

set this mode on a file or directory

chmod u=rwx,g=rwx,o= path

the same, written symbolically

find path -type d -exec chmod 770 {} +

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

770
-rwxrwx---
WhoreadwriteexecuteDigit
owner7
group7
others0

The owner can read, write and execute; the group can read, write and execute; everyone else can do nothing.

chmod 770 file
chmod u=rwx,g=rwx,o= file

Read the full guide to chmod 770 →

Frequently asked questions

770 vs 775?

775 lets everyone else list and read the directory; 770 hides it from them entirely. Choose 770 when outsiders have no reason to see the contents.

Related modes