chmod 660
chmod 660 is rw-rw----.
What 660 grants
| Who | Digit | Permissions | Adds up as |
|---|---|---|---|
| Owner | 6 | read, write | 4 + 2 = 6 |
| Group | 6 | read, write | 4 + 2 = 6 |
| Others | 0 | no access | 0 |
When 660 is the right answer
Owner and group read and write, nothing for others. Used where two accounts in the same group both need to write, such as a shared upload directory’s files.
The command
chmod 660 filename
chmod -R 660 directory/
Note that nobody has the execute bit here, so this value cannot be used on a directory that anyone needs to enter. On a directory, execute grants traversal rather than the right to run something.
How it is written elsewhere
| Octal | 660 |
| Symbolic | rw-rw---- |
As a file in ls -l | -rw-rw---- |
As a directory in ls -l | drw-rw---- |
| Binary | 110 110 000 |
| World-writable | No |
Frequently asked questions
What does chmod 660 mean?
It sets owner to read, write, group to read, write, others to no access. In symbolic notation that is rw-rw----.
How do I apply 660?
Run chmod 660 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 660 safe?
It 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 660 in symbolic notation?
rw-rw----. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rw-rw---- and a directory as drw-rw----.