chmod 770
chmod 770 is rwxrwx---.
What 770 grants
| Who | Digit | Permissions | Adds up as |
|---|---|---|---|
| Owner | 7 | read, write, execute | 4 + 2 + 1 = 7 |
| Group | 7 | read, write, execute | 4 + 2 + 1 = 7 |
| Others | 0 | no access | 0 |
When 770 is the right answer
Owner and group have full access, others get nothing. The right setting for a directory that a group works in together and nobody outside should see.
The command
chmod 770 filename
chmod -R 770 directory/
Because the owner has the execute bit, this works on a directory as well as a file — on a directory, execute is what grants the right to enter it and reach the entries inside.
How it is written elsewhere
| Octal | 770 |
| Symbolic | rwxrwx--- |
As a file in ls -l | -rwxrwx--- |
As a directory in ls -l | drwxrwx--- |
| Binary | 111 111 000 |
| World-writable | No |
Frequently asked questions
What does chmod 770 mean?
chmod 770 sets owner to read, write, execute, group to read, write, execute, others to no access. In symbolic notation that is rwxrwx---.
How do I apply 770?
Run chmod 770 filename. Add -R to apply it to a directory and everything inside, though be careful: a recursive numeric chmod marks every file the same way, which is rarely correct for a mixed tree of files and directories.
Is 770 safe?
chmod 770 grants no write access outside the owner and the group, so it is a reasonable setting as long as the owner is the account you intend.
What is 770 in symbolic notation?
rwxrwx---. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rwxrwx--- and a directory as drwxrwx---.
Other permission values
- chmod 774 — rwxrwxr--
- chmod 775 — rwxrwxr-x
- chmod 776 — rwxrwxrw-
- chmod 777 — rwxrwxrwx
- chmod 1777 — rwxrwxrwt
- chmod 2755 — rwxr-sr-x
- chmod 2775 — rwxrwsr-x
- chmod 4755 — rwsr-xr-x
- chmod 4711 — rws--x--x
- chmod 6755 — rwsr-sr-x
- chmod 000 — ---------
- chmod 400 — r--------
- chmod 440 — r--r-----
- chmod 444 — r--r--r--