chmod 600 Linux Permissions Calculator

Symbolic: -rw------- · Owner read & write only · Gold standard for SSH keys and .env files

chmod 600 (0600) LOW RISK SSH KEY VALID
4-digit: 0600
Dir: drw-------
Presets:
Interactive Permission Matrix (3×3 + Special Bits) -rw-------
Scope Read (4) Write (2) Execute (1) Digit Sum
Owner (u) 4(r) + 2(w) = 6
Group (g) 0 (none)
Others (o) 0 (none)
Special Mode Bits (4th Leading Octal Digit) 0 (none)
File / Dir Symbolic
-rw------- / drw-------
Binary Bitmask
110 000 000
umask Complement
Dir 177 · File 066
umask 066 creates files as 600 (dirs as 711).
Security Audit & Command Builder
Clean Least-Privilege Permission Set: Mode 600 restricts write access to the owner and avoids world-writable or SUID escalation risks.
OpenSSH Audit (SSH KEY VALID): Passes OpenSSH StrictModes (600 hides private keys from group/others). Recommended for ~/.ssh/id_ed25519, id_rsa, and AWS .pem keys.
Apply Permission (Octal & Symbolic)
chmod 600 ~/.ssh/id_ed25519
Symbolic: chmod u=rw,g=,o= ~/.ssh/id_ed25519
Recursive chmod -R
chmod -R 600 ~/.ssh/id_ed25519
Safe Recursive Split (Dirs vs Files via find)
find ~/.ssh/id_ed25519 -type d -exec chmod 700 {} +
find ~/.ssh/id_ed25519 -type f -exec chmod 600 {} +
Verify Permissions with stat
stat -c "%a %A %U:%G %n" ~/.ssh/id_ed25519
macOS/BSD: stat -f "%Op %Sp %Su:%Sg %N" ~/.ssh/id_ed25519
Side-by-Side Octal Comparison
Open /chmod/400/ →
Property chmod 600 (-rw-------) chmod 400 (-r--------)
Octal (3/4-Digit)600 (0600)400 (0400)
File Symbolic-rw--------r--------
Directory Symbolicdrw-------dr--------
Owner (u)Read, Write (6)Read (4)
Group (g)None (0)None (0)
Others (o)None (0)None (0)
Special BitsNoneNone
Binary Bits110 000 000100 000 000
Matching umaskDir: 177 / File: 066Dir: 377 / File: 266
Security RiskLOW RISKLOW RISK
SSH Private KeySSH KEY VALIDSSH KEY VALID
Common Use CaseStandard security mode for ~/.ssh/id_ed25519, ~/.ssh/id_rsa, ~/.ssh/config, ~/.ssh/authorized_keys, .env secrets, ~/.pgpass, and ~/.netrc.Read-only by owner (AWS EC2 .pem keys, immutable secrets)
chmod 600 · -rw------- umask 177 (dir) / 066 (file)
Ctrl+Enter: Copy chmod · 100% Browser-Local
Advertisement
Reserved fixed-height slot (CLS = 0.00) 728×90 320×100 300×50

The Complete OpenSSH & Credential File Checklist for chmod 600

chmod 600 (-rw-------) gives only the owning user read and write access, blocking both group members and other system users completely. OpenSSH, PostgreSQL psql (~/.pgpass), cURL (~/.netrc), and Ansible vaults all explicitly check stat(2) mode bits at runtime and abort with a security error if group or world bits are non-zero.

Keep this exact OpenSSH permission map handy: set ~/.ssh itself to 700 (directories need execute bit to traverse), private keys (id_ed25519, id_rsa), ~/.ssh/config, and ~/.ssh/authorized_keys to 600, and public keys (*.pub) to 644. Never apply chmod 600 to a directory, or you will lose the ability to cd into it.

  • Symbolic Mode-rw------- (file) · drw------- (directory) · Octal 0600
  • Permission BitsOwner: rw- (6) · Group: --- (0) · Others: --- (0)
  • Strict CLI ChecksRequired by OpenSSH, PostgreSQL ~/.pgpass, curl ~/.netrc, and Docker secrets
Why does SSH say "Bad owner or permissions on ~/.ssh/config"?

OpenSSH refuses ~/.ssh/config if it is group-writable or world-writable (often caused by umask 0002). Run chmod 600 ~/.ssh/config to fix it immediately.

What is the difference between chmod 600 and chmod 400?

chmod 600 (-rw-------) lets the owner read and edit the file, while chmod 400 (-r--------) makes it read-only even for the owner. Both satisfy OpenSSH for private keys.

Should I use chmod 600 on ~/.ssh directory?

No! Directories require the execute bit to access files inside them. Use chmod 700 ~/.ssh for the directory and chmod 600 ~/.ssh/id_ed25519 for files inside it.