chmod 600

chmod 600 gives rw-------. Read and write for the owner only. The right mode for SSH private keys, .env files, credentials and mail spools.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Owner

Group

Others

Permissions

rw-------

Command

chmod 600 file

Chmod Calculator

chmod 600 explained

Octal600
Symbolicrw-------
Ownerread, write
Groupno access
Othersno access
ls -l Shows-rw-------
Commandchmod 600 file
Symbolic Commandchmod u=rw,g=,o= file

Each digit of 600 is one class of user and adds up read (4), write (2) and execute (1). 6 for the owner is read, write; 0 for the group is no access; 0 for the others is no access.

Read and write for the owner only. The right mode for SSH private keys, .env files, credentials and mail spools.

On a directory, execute means permission to enter it and reach files inside; read means permission to list it. That is why directories usually have execute wherever they have read.

Questions

What does chmod 600 mean?
Owner: read, write. Group: no access. Others: no access. In letters: rw-------.
Is chmod 600 safe?
Yes, for the uses described here. Nobody outside the classes given write access can change the file.
How do I apply 600 to every directory but not files?
find /path -type d -exec chmod 600 {} + (and use -type f for files only).
How do I set 600 recursively?
chmod -R 600 /path. Be careful: this gives files and directories the same mode, which is rarely what you want; the find command above is safer.

Run servers for other people?

Frabs stops the abuse their VMs send out, and keeps your network off blocklists.