breakitdown

chmod 700 (rwx------)

Answer

chmod 700 sets rwx------: the owner can read, write and execute (or, for a directory, list, enter and change it), and nobody else can do anything with it. It is the standard mode for private directories such as ~/.ssh.

Try

chmod 700 = rwx------: owner full access, everyone else nothing.

Read 4Write 2Execute 1Digit
Owner (user)7
Group0
Others0
Special0
  1. 7
    Owner (user): 7 = 4 read + 2 write + 1 execute
  2. 0
    Group: 0 = no permissions
  3. 0
    Others: 0 = no permissions

On a file

  • Owner (user) read it, change it and run it as a program
  • Group no access
  • Others no access

On a directory

  • Owner (user) list the names inside, enter it and open files by name, create and rename and delete entries
  • Group no access
  • Others no access

chmod 700 filechmod u=rwx,go= filels -l → -rwx------

What to know

On a directory, 700 hides both the names inside and the files themselves from everyone but the owner, whatever the files' own modes are, because no one else can enter the directory.

On a file, 700 means a program or script only you can run. That is the main difference from 600: the execute bit.

Where it fits

Gotchas

Related explainers

← chmod calculator