chmod 550 (r-xr-x---)
The owner and group can read and run the file, and nobody can write to it.
r-xr-x---Who can do what
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | – | ✓ |
| Group | ✓ | – | ✓ |
| Others | – | – | – |
- Owner can read and execute.
- Group can read and execute.
- Others can nothing.
Commands
Set the mode
chmod 550 my-file # same thing in symbolic form: chmod u=rx,g=rx,o= my-file
In ls -l output, a file with this mode shows as -r-xr-x--- and a directory as dr-xr-x---.
Try a different mode
| Read | Write | Execute | Special | |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
Octal Symbolic
Command