Linux file permissions

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

Owner: read, write · Group: read · Others: no access

640numeric
rw-r-----symbolic
6 · 4 · 0owner · group · others
Commands
chmod 640 filename chmod u=rw,g=r,o= filename chmod -R 640 folder/ # apply to a folder and everything in it

Change any permission with the chmod calculator.

What chmod 640 means

WhoDigitLettersCan
Owner (user)6rw-read, write
Group4r--read
Others0---no access

Each digit is the sum of read (4), write (2) and execute (1).

When to use 640

Config files readable by a service’s group but not by other users.

Related permissions

Questions

What does chmod 640 mean?

chmod 640 sets the permissions to rw-r-----: the owner can read, write, the group can read and others can no access.

When should I use 640?

Config files readable by a service’s group but not by other users.

What is 640 in symbolic form?

640 is rw-r----- (shown by ls -l as -rw-r----- for a file or drw-r----- for a folder). The symbolic chmod command is chmod u=rw,g=r,o= file.