tool::chmod-detail
chmod 600
rw-------
Owner-Only Read/Write
Permission Structure
Owner (User)
✓Read (r)
✓Write (w)
✗Execute (x)
Group
✗Read (r)
✗Write (w)
✗Execute (x)
Others
✗Read (r)
✗Write (w)
✗Execute (x)
Octal
600Symbolic
rw-------Explanation
chmod 600 gives only the owner read and write permissions with no execute bit. This is the required permission for SSH private keys, .env files, and any file containing credentials or secrets. Other users cannot access the file at all — they cannot read its contents or see its metadata beyond its existence.
Common Use Cases
- ▸SSH private keys (~/.ssh/id_rsa, id_ed25519)
- ▸.env files (API keys, database passwords)
- ▸SSL/TLS certificate private keys
- ▸Credential files (~/.netrc, ~/.pgpass)
- ▸GPG private key files
Security Considerations
SSH private keys must be 600. Too-broad permissions cause 'WARNING: UNPROTECTED PRIVATE KEY FILE!' and connection refusal. Set .env files to 600 so other users on the same server cannot read your API keys. Always deploy secret files at 600 in CI/CD pipelines.
Command Examples
$ chmod 600 ~/.ssh/id_rsa$ chmod 600 ~/.ssh/id_ed25519$ chmod 600 .env .env.production$ chmod 600 /etc/ssl/private/server.keyRelated Permissions
ad · 300×250
// related tools