Skip to content

chmod 711

chmod 711 sets rwx--x--x: the owner has full access, and everyone else can only execute. On a directory that means they can pass through it to a path whose name they already know, but cannot list what is inside.

Permission matrix

Which permission bits each class has
WhoRead (4)Write (2)Execute (1)Digit
Owner (u)YesYesYes7
Group (g)NoNoYes1
Others (o)NoNoYes1

Execute means different things by type. On a file it lets the kernel run it as a program. On a directory it is search permission: entering it (cd) and reaching the files inside by name. Read on a directory only lists names.

What each class can do with a file and with a directory
WhoOn a fileOn a directory
Owner (u)Read, modify and runList, enter, create, delete and rename entries
Group (g)Run a compiled binary; scripts fail without readEnter and open entries by exact name; cannot list
Others (o)Run a compiled binary; scripts fail without readEnter and open entries by exact name; cannot list

Facts

Representations of this mode
Octal711 (0711)
Symbolicrwx--x--x
ls -l, file-rwx--x--x
ls -l, directorydrwx--x--x
Equivalent symbolic commandchmod u=rwx,go=x
Default umask that creates itNone of the common umasks; set it explicitly with chmod
How Git records a file with it100755 (executable)
Special bitsNone

When to use it

  • Home directories on shared hosting, so the web server can reach /home/alice/public_html while other customers cannot list /home/alice.
  • Compiled binaries that others may run but should not copy or inspect: the kernel can execute a binary without read permission. The WordPress permissions guide shows a php-cgi binary tightened from 755 to 711 this way.

When not to use it

  • Scripts: a script needs read permission for its interpreter, so a 711 shell or Python script fails for everyone but the owner (bash reports permission denied when it tries to read it).
  • As real secrecy for a directory: names can still be guessed. A predictable path such as /home/alice/.bashrc is reachable if that file is readable. Use 700 when nothing inside should be reachable.

Commands

Set it on one file or directory
chmod 711 /home/alice
chmod u=rwx,go=x /home/alice   # same result
Check the result
stat -c '%a %A %n' /home/alice     # Linux (GNU stat): 711 drwx--x--x
stat -f '%Lp %Sp %N' /home/alice   # macOS and BSD

Applying it to a whole tree

Apply 711 to the specific directory (usually a home directory) or binary, not to a tree. Recursively it would make every file executable-only and unreadable to others.

Git and the execute bit

Git stores only one permission fact per file: 100755 if the owner execute bit is set, 100644 otherwise. A file with this mode is committed as 100755; the group and others bits never reach the repository. On Windows, or where core.fileMode is false, set the bit with git update-index --chmod=+x.

Frequently asked questions

What does chmod 711 mean?
Owner 7 (rwx), group 1 (--x), others 1 (--x). Group and others can only execute: run a binary, or traverse a directory.
Can someone read a file inside a 711 directory?
Yes, if they know its exact name and the file itself grants them read. 711 hides the listing, not the files.
Why use 711 instead of 755 on a home directory?
Both let the web server reach public_html. 711 also stops other users from running ls on your home and seeing what you keep there.

Last reviewed by Arielton Oberek.