chmod 440 (r--r-----)
Read-only for the owner and group. /etc/sudoers and files in /etc/sudoers.d use this mode.
r--r-----Who can do what
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | – | – |
| Group | ✓ | – | – |
| Others | – | – | – |
- Owner can read.
- Group can read.
- Others can nothing.
Commands
Set the mode
chmod 440 my-file # same thing in symbolic form: chmod u=r,g=r,o= my-file
In ls -l output, a file with this mode shows as -r--r----- and a directory as dr--r-----.
Try a different mode
| Read | Write | Execute | Special | |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
Octal Symbolic
Command