Tools › Chmod permissions › chmod 640
chmod 640 explained (rw-r-----)
chmod 640 sets the permissions to rw-r-----.
- Owner: read, write
- Group: read
- Others: no access
When to use it
Config files containing credentials that a service group needs to read.
Security note
Make sure the file's group is the service's group, otherwise the service cannot read it.
Tip: applying it to files and directories separately
Directories need the execute bit to be entered, files usually do not. Set them separately: find dir -type d -exec chmod 755 {} + and find dir -type f -exec chmod 644 {} +.