chmod 640 — what rw-r----- means

640 rw-r-----

The owner can read and write; the group can read only; others get nothing.

Permission breakdown

When to use 640

Config or log files that a service group needs to read but the public must not. Common for files owned by you and shared with a daemon's group, like /var/log entries or app config read by a worker group.

Set it with chmod

Apply this permission to a file:

chmod 640 filename

Or apply it recursively to a directory and everything inside it:

chmod -R 640 directory/

Other common permissions

Or build any permission with the interactive chmod calculator.