Search tools

Developer guides

chmod 700 Meaning: What It Does and When to Use It

What does chmod 700 mean? Learn how Linux permission 700 works, why it locks out group and world, and when to use it on your private keys and scripts.

Terminal card displaying Linux file permission drwx------ with breakdown cards for owner, group, and others.

If you want to understand the chmod 700 meaning, here is the short answer: it gives you full control over a file or folder and locks everyone else out completely. The file owner can read, write, and execute it. Your user group gets zero access. Other users on the system get zero access.

In terminal notation, chmod 700 sets permissions to rwx------.

Here is what that looks like in numbers:

7 (Owner):  Read (4) + Write (2) + Execute (1) = 7
0 (Group):  No permissions                     = 0
0 (Others): No permissions                     = 0

If you ever forget permission numbers while working in the terminal, check the chmod calculator to calculate permissions visually.

Breaking down the chmod 700 meaning

Linux permissions divide access into three user categories. Every digit in 700 controls one category:

  1. First digit (7) applies to the User (Owner): Read (4) + Write (2) + Execute (1). The owner can view the file, edit or delete it, and run it as an executable program or open the directory.
  2. Second digit (0) applies to the Group: Zero access. Members of your team or shared system group cannot view, modify, or run the file.
  3. Third digit (0) applies to Others (Everyone else): Zero access. Any other user account or background daemon running under another UID gets a permission denied error.

When you run ls -la, a folder with 700 permissions looks like this:

drwx------ 2 alex alex 4096 Nov 11 10:15 private_scripts

Notice the nine dashes and letters after the leading d. The owner gets rwx. The next six characters are ------. That tells you the group and world have no access at all.

When should you use chmod 700?

chmod 700 is one of the most common security permissions in Linux. You use it whenever a directory or executable must remain strictly private to your own account.

1. Your ~/.ssh folder

Your personal SSH directory holds your private keys, known hosts, and authorized keys. If other users on the machine can inspect your keys, your server security is gone. In fact, OpenSSH will refuse to connect if this directory has loose permissions.

Set your SSH directory to 700:

chmod 700 ~/.ssh

Inside that folder, your private keys need chmod 600 (read and write only, no execute), while your folder needs 700 so your account can traverse into it.

2. Private executable scripts

If you write a maintenance script containing API tokens, database passwords, or backup logic, nobody else on the machine should run or view it:

chmod 700 backup_database.sh

Now you can run ./backup_database.sh directly, but no other user can read your secrets or run the job.

3. Sensitive user data directories

On shared servers or multi-tenant machines, your home directory subfolders (like ~/secrets, ~/finances, or ~/backups) should be isolated from coworkers:

chmod -R 700 ~/private_data/

The -R flag applies the rule recursively to all nested folders and files inside.

Why folders need execute (7) but files usually do not

A common mistake is thinking “execute” (x or 1) only matters for shell scripts or binaries.

On Linux, folders treat execute permission differently: - Read (r / 4) on a folder: Lets you list file names inside (e.g. ls folder/). - Write (w / 2) on a folder: Lets you create, rename, or delete files inside. - Execute (x / 1) on a folder: Lets you enter the directory (e.g. cd folder/) and access file metadata.

If you give a directory chmod 600, you can read the names of the files inside, but you cannot cd into it or open any file. That is why private directories use chmod 700, while private non-executable files (like .env or SSL certificates) use chmod 600.

You can test how these flags behave on specific modes with the chmod 700 calculator.

chmod 700 vs 755 vs 600: Quick comparison

Developers often mix up 700, 755, and 600. Here is how they differ:

Permission Symbolic Who has access? Best used for
chmod 700 rwx------ Owner only (full access) ~/.ssh directory, private bash scripts
chmod 755 rwxr-xr-x Owner full, everyone else can read & execute Public web folders (/var/www/html), public binaries (/usr/local/bin)
chmod 600 rw------- Owner read & write only SSH private keys (id_ed25519), .env secret files
chmod 644 rw-r--r-- Owner read/write, everyone can read Normal web files (HTML, CSS, images)

Never use chmod 700 on files that your web server (like Nginx or Apache) needs to serve. Web servers usually run under dedicated system users like www-data or nginx. Setting web files to 700 causes an immediate 403 Forbidden error.

Frequently asked questions

Does chmod 700 work on Windows?

Not natively. Windows uses Access Control Lists (ACLs) rather than standard POSIX octal bits. If you are running Linux via WSL (Windows Subsystem for Linux), WSL emulates POSIX permissions so chmod 700 works as expected inside your Linux environment.

Can root access a chmod 700 file?

Yes. The root superuser (UID 0) bypasses standard file permission checks. chmod 700 protects your files from other regular users and background services, not from root.

How do I undo chmod 700?

If you want to restore standard folder access so other users or web servers can read it, set it back to 755:

chmod 755 /path/to/folder

For regular documents and web pages, restore them to 644:

chmod 644 /path/to/file.txt

Next steps

Understanding the chmod 700 meaning gives you confidence when locking down confidential servers and private keys. Before changing permissions on a production box, experiment with bit values on the chmod calculator to make sure you never lock yourself out.

Read next