chmod 400

Only the owner can read. Nobody can write, including the owner (without changing the mode).

Applies to
Permissions
ReadWriteExecuteValue
Owner
Group
Others
Special bits:

Calculated on your device.

What chmod 400 means

400 (r--------) protects a secret from accidental edits as well as from other users. AWS, for example, asks for downloaded .pem key files to be set to 400 before using them with SSH.

Adjust the checkboxes above to see how a different mode compares, or go back to the chmod calculator.

Other common values