chmod 444 (r--r--r--)
Read-only for everyone. Useful for files that nobody, including the owner, should change by accident.
r--r--r--Who can do what
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | – | – |
| Group | ✓ | – | – |
| Others | ✓ | – | – |
- Owner can read.
- Group can read.
- Others can read.
Commands
Set the mode
chmod 444 my-file # same thing in symbolic form: chmod u=r,g=r,o=r my-file
In ls -l output, a file with this mode shows as -r--r--r-- and a directory as dr--r--r--.
Try a different mode
| Read | Write | Execute | Special | |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
Octal Symbolic
Command