Tools › Chmod permissions › chmod 400
chmod 400 explained (r--------)
chmod 400 sets the permissions to r--------.
- Owner: read
- Group: no access
- Others: no access
When to use it
Highly sensitive read-only files such as certificate private keys.
Security note
The owner cannot write to it without first running chmod u+w.
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 {} +.