chmod 774
chmod 774 is rwxrwxr--.
What 774 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 | 4 | read | 4 = 4 |
When 774 is the right answer
Owner and group full access, others read only. Used for a group working area whose contents should still be publicly readable.
The command
chmod 774 filename
chmod -R 774 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 | 774 |
| Symbolic | rwxrwxr-- |
As a file in ls -l | -rwxrwxr-- |
As a directory in ls -l | drwxrwxr-- |
| Binary | 111 111 100 |
| World-writable | No |
Frequently asked questions
What does chmod 774 mean?
It sets owner to read, write, execute, group to read, write, execute, others to read. In symbolic notation that is rwxrwxr--.
How do I apply 774?
Run chmod 774 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 774 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 774 in symbolic notation?
rwxrwxr--. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rwxrwxr-- and a directory as drwxrwxr--.