What does chmod 440 mean?
chmod 440 gives read-only for owner and group. Owner and group can read, nobody can write. /etc/sudoers ships with 440 (owned by root) so it cannot be edited accidentally; use visudo to change it.
| Who | Digit | Symbolic | Permissions |
|---|---|---|---|
| Owner (user) | 4 | r-- | read |
| Group | 4 | r-- | read |
| 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--r-----.
How to use chmod 440
# one file or directory
chmod 440 filename
# the same permissions in symbolic form
chmod u=r,g=r,o= filename
# a directory and everything inside it
chmod -R 440 directory/
# only regular files
find path/ -type f -exec chmod 440 {} +
Need a different combination? Tick the boxes in the chmod calculator to get the octal and symbolic values instantly.
Preguntas frecuentes
What does chmod 440 do?
What is 440 in symbolic notation?
r--r-----, or chmod u=r,g=r,o= as a symbolic chmod command.