Kitloft

All tools / chmod reference

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.

chmod 500 in symbolic form
r-x------

Who can do what

ReadWriteExecute
Owner✓–✓
Group–––
Others–––

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

ReadWriteExecuteSpecial
Owner
Group
Others
Octal Symbolic
Command