chmod 711: Directories You Can Enter but Cannot List
711 is rwx--x--x: the owner has full control while the group and everyone else get execute only. On a directory that means they can traverse through it to a path they already know, but cannot list what is inside.
At a glance
- Octal
- 711, written 0711 in four digit form
- Symbolic
- u=rwx,g=x,o=x
- On a file
- -rwx--x--x
- On a directory
- drwx--x--x
- Owner
- Read, write, execute
- Group
- Traverse only. Cannot list, cannot create
- Others
- Traverse only. Can open a known path inside, cannot discover names
In detail
711 is the clearest demonstration that read and execute are different permissions on a directory. Execute grants the right to resolve a name through the directory; read grants the right to enumerate the names. With execute but no read, a process that already knows a file is called report.pdf can open it, and the same process running ls gets permission denied.
The classic use is a home directory on a shared host that also serves personal web pages. /home/alice at 711 lets the web server traverse into /home/alice/public_html without letting other users on the box list what else is in Alice's home. Some hosting panels set exactly this, and it is why you can sometimes fetch a file by URL from a directory you cannot browse.
It is a usability barrier rather than a security boundary. Names can leak from logs, backups, error messages, browser history or simple guessing, and once a name is known the file opens if its own mode allows it. Treat 711 as a way to keep casual listing out, never as a way to keep a secret. The file's own mode is what protects the contents.
On a file rather than a directory, 711 is almost always a mistake. It means others can execute the program but cannot read it, which works for a compiled binary and fails immediately for a shell script, because the interpreter has to read the script's bytes to run it. A non readable script produces permission denied even though the execute bit is set.
Load it into the calculator next to 755 and the difference is one column: r becomes a dash for group and others, and the ls -l rendering changes from drwxr-xr-x to drwx--x--x. That single column is the whole difference between a browsable directory and a traversable one.
Examples
chmod 711 /home/alice
chmod u=rwx,g=x,o=x /home/alicedrwx--x--x alice alice /home/alice/
$ whoami
bob
$ ls /home/alice
ls: cannot open directory '/home/alice': Permission denied
$ cat /home/alice/public_html/index.html
<!doctype html> ... # works, the name was known-rwx--x--x alice alice build.sh
$ ./build.sh
-bash: ./build.sh: Permission denied
The shell must read the script to interpret it. Compiled
binaries can run without read; scripts cannot.Things that catch people out
- 711 on a shell script does not work. Interpreted files need the read bit as well as the execute bit, so use 755 or 750 for scripts.
- Anything that walks a tree, such as a backup job, a search indexer or tab completion, will fail against a 711 directory even though a direct open succeeds.
- 711 hides names, not contents. If the file inside is 644, anyone who learns the name reads it. Set the file mode independently.
- Recursive 711 across a project makes every directory unlistable including for tooling you rely on, and the resulting errors point at the tool rather than at the mode.
Try it: Chmod Calculator
Tick the nine permission boxes, or type an octal or symbolic value, and get the three digit and four digit octal, the ls -l rendering and the exact chmod command back.
Chmod Calculator
LOCAL · Browser-OnlyCalculate Unix file permissions with an interactive chmod builder
Permission Matrix
| Entity | Read (4) | Write (2) | Execute (1) | Octal | Symbolic |
|---|---|---|---|---|---|
| Owner (u) | 7 | rwx | |||
| Group (g) | 5 | r-x | |||
| Others (o) | 5 | r-x |
Special Bits
Advanced permission flags for executables and directories
Generated Permissions
755rwxr-xr-x-rwxr-xr-xchmod 755 filenamechmod u=rwx,g=rx,o=rx filenamePermission Breakdown
Owner (u)
7rwx- - Read files / list directory contents
- - Write / modify / delete
- - Execute / traverse directory
Group (g)
5r-x- - Read files / list directory contents
- - Execute / traverse directory
Others (o)
5r-x- - Read files / list directory contents
- - Execute / traverse directory
Common Permissions Reference
| Octal | Symbolic | Meaning |
|---|---|---|
777 | rwxrwxrwx | Full access for everyone |
755 | rwxr-xr-x | Owner full, others read and execute |
750 | rwxr-x--- | Owner full, group read and execute |
700 | rwx------ | Owner full access only |
666 | rw-rw-rw- | Read and write for everyone |
644 | rw-r--r-- | Owner read/write, others read only |
600 | rw------- | Owner read/write only |
555 | r-xr-xr-x | Read and execute for everyone |
444 | r--r--r-- | Read only for everyone |
400 | r-------- | Owner read only |
Related File permissions
All file permissions →chmod 755: The Standard Mode for Directories and Programs
755 gives the owner full control and everyone else read and execute. Why it is right for directories and executables and wrong for ordinary data files.
chmod 700: Private Directories Such as ~/.ssh
700 gives the owner read, write and execute and everyone else nothing. Why SSH insists on it for ~/.ssh and what breaks when a parent is more open.
The Execute Bit on a Directory Means Traverse, Not Run
On a directory, execute grants the right to resolve names through it and read grants the right to list them. Why a directory at 644 cannot be entered.
chmod 733: Blind Drop Directories and What They Miss
733 lets others write and traverse a directory without listing it. The upload drop box pattern, and why it needs the sticky bit to be safe.
chmod 766: A Mode That Is Almost Always an Accident
766 gives the owner execute and leaves the file writable by the group and by everyone else. Why it combines two errors and what was probably intended.
chmod 666: World Writable Files and the Few Legitimate Ones
666 lets every account read and write the file with no execute bit anywhere. Why it is wrong for regular files and right for a handful of device nodes.
Tools for this
- Chmod Calculator Free online chmod calculator - calculate Unix file permissions with an interactive chmod builder