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
Group
Team or service account
Public (Others)
All other system users
Security Assessment
Status: Safe
Target:
chmod 400 deploy.shchmod -R 400 /var/www/deploy.shInteractive Permission Matrix (rwx)
| Role | Read (r - 4) | Write (w - 2) | Execute (x - 1) | Octal Total |
|---|---|---|---|---|
| Owner (User) | 4 | |||
| Group | 0 | |||
| Others (Public) | 0 |
Copyable chmod 400 Commands
Apply to Single File
chmod 400 target_fileApply Recursively to Directory
chmod -R 400 /path/to/folderOnly 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--------".