chmod 400 — what r-------- means
400
r--------
The owner can read only; nobody can write or execute, and group and others get nothing.
Permission breakdown
When to use 400
Write-protecting a sensitive file even from yourself — for example an SSH key or certificate you want to read but never accidentally overwrite. Combine with ownership by root for extra safety.
Set it with chmod
Apply this permission to a file:
chmod 400 filename
Or apply it recursively to a directory and everything inside it:
chmod -R 400 directory/
Other common permissions
Or build any permission with the interactive chmod calculator.