chmod 700
chmod 700 is rwx------.
What 700 grants
| Who | Digit | Permissions | Adds up as |
|---|---|---|---|
| Owner | 7 | read, write, execute | 4 + 2 + 1 = 7 |
| Group | 0 | no access | 0 |
| Others | 0 | no access | 0 |
When 700 is the right answer
Full access for the owner, nothing for anyone else. The right setting for a private directory such as ~/.ssh, and for scripts that should be runnable only by their owner.
The command
chmod 700 filename
chmod -R 700 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 | 700 |
| Symbolic | rwx------ |
As a file in ls -l | -rwx------ |
As a directory in ls -l | drwx------ |
| Binary | 111 000 000 |
| World-writable | No |
Frequently asked questions
What does chmod 700 mean?
It sets owner to read, write, execute, group to no access, others to no access. In symbolic notation that is rwx------.
How do I apply 700?
Run chmod 700 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 700 safe?
It grants no write access outside the owner, so it is a reasonable setting as long as the owner is the account you intend.
What is 700 in symbolic notation?
rwx------. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rwx------ and a directory as drwx------.