Search tools

Linux file permissions

chmod 700: what it means and when to use it

chmod 700 gives the owner full access and gives nobody else anything at all.

700 rwx------
What chmod 700 allows for each class of user
WhoDigitRead WriteExecute
Owner 7 Yes Yes Yes
Group 0 No No No
Everyone else 0 No No No

How chmod 700 works

The 7 represents read (4), write (2), and execute (1) for the file owner. The two zeros remove all permissions from the group and everyone else. In symbolic notation, this is written as <code>rwx------</code>.

What does chmod 700 do in practice? It locks a file or directory down so only your user account can read, edit, or enter it. If any other user on the server tries to view the directory or run files inside, Linux rejects them with 'Permission denied'.

This makes 700 the standard security setting for private directories and scripts. SSH requires your <code>~/.ssh</code> directory to be set to 700, and personal backup scripts containing passwords should always use this mode.

Where 700 belongs

  • The .ssh folder in your home directory
  • Private shell scripts that handle passwords or keys
  • Personal directories on shared Linux servers

The command

Both of these set exactly the same permissions. The number is shorter; the letters are easier to read back later.

chmod 700 filename
chmod u=rwx,g=,o= filename

Services running under a different user account, such as Nginx or Apache, cannot access anything inside a 700 folder.

Open 700 in the chmod calculator