Kitloft

All tools / chmod reference

chmod 640 (rw-r-----)

The owner can read and write and the group can read. Common for config files a service reads through its group.

chmod 640 in symbolic form
rw-r-----

Who can do what

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

Commands

Set the mode
chmod 640 my-file
# same thing in symbolic form:
chmod u=rw,g=r,o= my-file

In ls -l output, a file with this mode shows as -rw-r----- and a directory as drw-r-----.

Try a different mode

ReadWriteExecuteSpecial
Owner
Group
Others
Octal Symbolic
Command