chmod 600-rw-------
chmod 600 restricts a file to read and write access for its owner only — nobody else, including the file's own group, gets any access at all.
Owner
You, the file's creator
Group
Everyone in the file's group
Public
Everyone else on the system
Special permissions(advanced, rarely needed)
Common presets
On a file, 600 means only the owning user can open or edit it; every other account on the system, including members of the file's group, is locked out entirely. This is the permission SSH itself enforces on private keys — it will refuse to use a key file that's any more permissive.
600 isn't a useful directory permission: without the execute bit, the directory can't be entered or traversed by anyone, including its owner, in the way you'd normally expect. For a private directory, use 700 instead, which adds the execute bit back for the owner.
When to use chmod 600
Reach for 600 on individual files that hold secrets: SSH private keys, .env files, API credential files, TLS private keys, and database dumps that contain real data.
Security notes
600 protects a secret from other local users, but not from root, and not from the file's own owner accidentally exposing it another way (committing it to git, for instance). Get the ownership right with chown alongside the mode — permissions only restrict who the file allows, not who owns it.