chmod 711
rwx--x--xSafe when used as intended
Owner can do everything; others can only pass through.
711 gives the owner full control and everyone else execute only. On a directory, execute without read means others can pass through to a path they already know — ~/public_html/index.html, say — but can't list what's inside.
It's the classic home-directory mode for servers that publish per-user web folders.
Permission by permission
| Who | Read | Write | Execute | Digit | Means |
|---|---|---|---|---|---|
| owner | ✓ | ✓ | ✓ | 7 | read, write and execute |
| group | — | — | ✓ | 1 | execute only |
| others | — | — | ✓ | 1 | execute only |
- In
ls -l:-rwx--x--xfor a file,drwx--x--xfor a directory. - Symbolic form:
u=rwx,g=x,o=x - New directories get this mode when the umask is
066.
Use it for
- Home directories that must let the web server reach
~/public_htmlwithout exposing their contents. - Parent directories of something that must be reachable by path.
Avoid it for
- Files: execute without read rarely makes sense for scripts, since the interpreter needs to read them.
- If others don't need to pass through at all, use
700.
Commands
chmod 711 path
set this mode on a file or directory
chmod u=rwx,g=x,o=x path
the same, written symbolically
find path -type d -exec chmod 711 {} +apply it to every directory in a tree, leaving the files alone
stat -c '%a %A %n' path
check the current mode on Linux (macOS: stat -f '%Lp %Sp %N' path)
Try variations
| Who | read | write | execute | Digit |
|---|---|---|---|---|
| owner | 7 | |||
| group | 1 | |||
| others | 1 |
The owner can read, write and execute; the group can execute only; everyone else can execute only.
chmod 711 file
chmod u=rwx,g=x,o=x file
Frequently asked questions
What does execute mean on a directory?
Permission to enter it and access entries by name. Read lets you list the names; execute lets you use them. 711 grants the second without the first.