Security: Safe

chmod 400 β€” r--------

Owner can ONLY read (r--). Group and Others have ZERO access (---).

Live Interactive Permission Matrix

Linux chmod Calculator & Generator

Octal Value
400
Symbolic
r--------
Quick Presets:
Owner (User)
The file creator
4
Group
Team or service account
0
Public (Others)
All other system users
0
Security Assessment
Status: Safe
View Full chmod 400 Guide β†’
Target:
chmod 400 deploy.sh
chmod -R 400 /var/www/deploy.sh

Interactive Permission Matrix (rwx)

RoleRead (r - 4)Write (w - 2)Execute (x - 1)Octal Total
Owner (User)4
Group0
Others (Public)0

Copyable chmod 400 Commands

Apply to Single File
chmod 400 target_file
Apply Recursively to Directory
chmod -R 400 /path/to/folder
Only Apply to Directories (find)
find /path/to/folder -type d -exec chmod 400 {} +
Only Apply to Files (find)
find /path/to/folder -type f -exec chmod 400 {} +

Recommended Real-World Use Cases

  • β€’Production AWS EC2 Key Pairs (`.pem` files)
  • β€’Immutable cryptographic signing keys
  • β€’Production audit certificates

Security Consideration

chmod 400 is the most restrictive practical permission for read-only private keys. It prevents accidental overwrites or edits even by the file owner.

Frequently Asked Questions

chmod 400 Questions & Answers

Common questions regarding Linux permissions, security risks, and recursive chmod commands.

Owner can ONLY read (r--). Group and Others have ZERO access (---). In symbolic notation, this is represented as "r--------".