What does chmod 500 mean?
chmod 500 gives owner can read and execute. A script or directory only its owner may use, and nobody can modify without changing permissions first.
| Who | Digit | Symbolic | Permissions |
|---|---|---|---|
| Owner (user) | 5 | r-x | read, execute |
| Group | 0 | --- | no access |
| Others | 0 | --- | no access |
Each digit is the sum of read (4), write (2) and execute (1). In ls -l the file shows as -r-x------ and a directory as dr-x------.
How to use chmod 500
# one file or directory
chmod 500 filename
# the same permissions in symbolic form
chmod u=rx,g=,o= filename
# a directory and everything inside it
chmod -R 500 directory/
# only directories (keep files separate)
find path/ -type d -exec chmod 500 {} +
Need a different combination? Tick the boxes in the chmod calculator to get the octal and symbolic values instantly.
Questions fréquentes
What does chmod 500 do?
What is 500 in symbolic notation?
r-x------, or chmod u=rx,g=,o= as a symbolic chmod command.