chmod 500 (r-x------)
The owner can read and run the file; nobody else has access. Good for private scripts that should not be edited.
r-x------Who can do what
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | – | ✓ |
| Group | – | – | – |
| Others | – | – | – |
- Owner can read and execute.
- Group can nothing.
- Others can nothing.
Commands
Set the mode
chmod 500 my-file # same thing in symbolic form: chmod u=rx,g=,o= my-file
In ls -l output, a file with this mode shows as -r-x------ and a directory as dr-x------.
Try a different mode
| Read | Write | Execute | Special | |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
Octal Symbolic
Command