chmod 755
chmod 755 is rwxr-xr-x.
What 755 grants
| Who | Digit | Permissions | Adds up as |
|---|---|---|---|
| Owner | 7 | read, write, execute | 4 + 2 + 1 = 7 |
| Group | 5 | read, execute | 4 + 1 = 5 |
| Others | 5 | read, execute | 4 + 1 = 5 |
When 755 is the right answer
The default for directories and for executable scripts: the owner can change things, everyone else can read and traverse or run. If a script will not run, this is usually the value you are reaching for.
The command
chmod 755 filename
chmod -R 755 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 | 755 |
| Symbolic | rwxr-xr-x |
As a file in ls -l | -rwxr-xr-x |
As a directory in ls -l | drwxr-xr-x |
| Binary | 111 101 101 |
| World-writable | No |
Frequently asked questions
What does chmod 755 mean?
It sets owner to read, write, execute, group to read, execute, others to read, execute. In symbolic notation that is rwxr-xr-x.
How do I apply 755?
Run chmod 755 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 755 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 755 in symbolic notation?
rwxr-xr-x. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rwxr-xr-x and a directory as drwxr-xr-x.