chmod 711 rwx--x--x

chmod 711 (rwx--x--x): the owner can read, write and execute; group and others can execute. Typical use: home directories on shared hosting.

Octal
711 (also written 0711)
Symbolic
rwx--x--x
ls -l shows
-rwx--x--x for a file, drwx--x--x for a directory
chmod letters
u=rwx,g=x,o=x

Who can do what

ClassDigitBitsOn a fileOn a directory
Owner (u)7rwxRead the contents, change or empty the contents and run it as a programList the names inside, create, delete and rename entries and enter it and open files by name
Group (g)1--xRun it if it is a compiled binary (a script also needs read)Enter it and open files by name
Others (o)1--xRun it if it is a compiled binary (a script also needs read)Enter it and open files by name

Each digit adds read (4), write (2) and execute (1). Deleting or renaming a file depends on write and execute on the directory that holds it, not on the file's own mode. Root bypasses read and write checks.

Typical uses

The owner has full access; everyone else can pass through but not list the contents. Shared hosting uses it for home directories, so the web server can reach ~/public_html while other users cannot see what else is in the home directory.

Security notes

  • Only the owner (and root) can change it; the group and others are limited to the read and execute rights shown above, which is the usual safe pattern for shared files and directories.

Commands

  • Numeric
    chmod 711 file
  • Symbolic
    chmod u=rwx,g=x,o=x file
  • Check the result
    stat -c '%a %A %n' file
  • Directories only, recursively
    find /path -type d -exec chmod 711 {} +

Avoid chmod -R 711 on a tree that holds files as well as folders: it makes every file executable. Use the find command above for directories and a file mode such as 644 for the files.

The umask that gives 711

  • umask 066: new directories are created as 711 (and files as 600)

Programs create files with 666 and directories with 777, and the umask removes bits from those. A umask never adds execute to a new file, and it cannot set setuid, setgid or the sticky bit.

Other common modes

Work out any other mode in the chmod calculator