chmod 440 — what r--r----- means

440 r--r-----

Owner and group can read only; nobody can write or execute; others have no access.

Note: this grants group or shared write access — fine for team directories, but make sure that is what you intend.

Permission breakdown

When to use 440

A sensitive config or secrets file (API keys, credentials) that a service account's group must read but nobody should modify or world-read. A common hardening target for files that must never be 644.

Set it with chmod

Apply this permission to a file:

chmod 440 filename

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

chmod -R 440 directory/

Other common permissions

Or build any permission with the interactive chmod calculator.