What does chmod 700 mean? Private folder permissions explained
By TechCompare · Updated · How we check
chmod 700 sets permissions to rwx------, so the owner can read, write and enter, while group and others get nothing. Use it for a private folder, such as ~/.ssh.
Mode 700 is the owner-only folder setting. In ls -l, a folder with this mode shows as drwx------. The owner can enter it and work with the files inside, while everyone else can't even list the file names. It's the setting to reach for when a folder should stay out of other accounts' view.
How this is calculated
In octal, the owner's digit is 7, made from 4 + 2 + 1. The chmod(1) manual says a numeric mode comes from adding up the bit values. The group and others digits, 0 and 0, add up to nothing, so neither can read, write or enter.
On a folder, execute is the bit that lets you in, and read only lets you list the names. That's why 700 is the folder version of chmod 600. A folder at 600 gives the owner read and write but no execute, so the names can be listed while the files inside stay out of reach.
The ssh(1) manual says the recommended permissions for ~/.ssh/ are 'read/write/execute for the user, and not accessible by others.' A file can have 700 too. The owner then gets execute, so a script with a first line like #!/bin/bash can run as ./backup.sh, and only the owner can run it.
Verdict
Keep 700 for folders like ~/.ssh or a folder of personal notes, where no other account has any reason to look inside. For a private file that doesn't need to run, use 600 or 400 instead.
Don't use 700 when a web server or another account has to read the folder. Those accounts need read and enter, so chmod 755 fits, or 750 when they share a group with you. For a shared project folder, a group mode works better than 700.
Watch out for chmod -R 700 dir. The -R flag applies the mode to every file inside, so every file gets execute for the owner. Set the files to 600 instead with find ~/private -type f -exec chmod 600 {} +. The -type f part picks regular files only, so folders are left alone.
More CHMOD scenarios
Related guides
Frequently asked questions
What does chmod 700 mean?
What is the right permission for the .ssh folder?
chmod 700 ~/.ssh. The ssh(1) manual recommends that mode for the directory, so the owner has full access and the group and others get nothing. Private keys inside can use 600 or 400.What's the difference between chmod 700 and 600?
Why does ls fail with 'Permission denied' in someone else's 700 folder?
Related tools
Subnet Calculator
Calculate network address, broadcast address, and usable IP ranges for IPv4/IPv6.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolUnix Timestamp
Convert between Unix timestamps and human-readable dates.
Use tool