Linux file permissions
chmod 700 meaning
The owner can read, write and execute; the group and everyone else can do nothing.
When to use 700
Private folders such as ~/.ssh and your own scripts: only you can open, change or run them.
What each digit allows
Read = 4, write = 2, execute = 1. Each digit is the sum for one group of users.
| Who | Digit | Symbolic | Read | Write | Execute |
|---|---|---|---|---|---|
| Owner (u) | 7 | rwx | Yes | Yes | Yes |
| Group (g) | 0 | --- | No | No | No |
| Others (o) | 0 | --- | No | No | No |
On a folder, read lists its contents, write adds or deletes files in it, and execute lets you open it (cd into it).
Commands
One file or folder, a folder with everything inside it, or only the folders inside a folder:
chmod 700 folder
chmod -R 700 folder/
find folder/ -type d -exec chmod 700 {} +
In cPanel: File Manager → right-click → Change Permissions, and tick the boxes until the number shows 700.
Try other permissions
Tick or untick the boxes to see the number, the symbolic form and the command.
| Read | Write | Execute | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Everyone else |
Special bits (setuid, setgid, sticky)
Common values
Symbolic