chmod 600 — what rw------- means

600 rw-------

The owner can read and write; group and others have no access whatsoever.

Permission breakdown

When to use 600

Common mistakes & gotchas

600 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 600 filename

Or apply it recursively to a directory and everything inside it:

chmod -R 600 directory/

The same thing in symbolic form:

chmod u=rw,g=,o= filename

Frequently asked questions

What does chmod 600 mean?

chmod 600 sets rw------- : the owner can read and write the file, and group and others get nothing — no read, no write, no execute. It is the standard mode for private files like SSH keys and credential configs.

Why does SSH require 600 on my private key?

OpenSSH treats a private key readable by anyone but you as compromised and refuses to use it, printing "Permissions are too open." Running chmod 600 on the key file restores owner-only access and lets SSH load it.

Should I use 600 or 400 for a secret?

Use 600 if you still need to edit or rotate the file in place; use 400 (read-only) if the file should never change, which also guards against accidental overwrites. Both keep group and others fully locked out.

Can I chmod 600 a directory?

You can, but you shouldn't — a directory needs the execute bit to be entered or listed by name, and 600 has none. For a private directory like ~/.ssh use 700 (rwx------) instead.

Other common permissions

Or build any permission with the interactive chmod calculator.