Skip to content

chmod 755: the standard mode for directories and executables

Runs in your browser — nothing you paste leaves this page. How we prove that

chmod calculator playground

Examples
Permission bits
Read
Write
Exec
Owner
Group
Other
Enter a value

The matrix, octal and symbolic fields all stay in sync — edit any one and the others follow.

Results update as you type — press Enter to run now.

fig. 29 — chmod-calculator · utilities 755 · rwxr-xr-x · file
Output
Octal755
Symbolicrwxr-xr-x
ls -l-rwxr-xr-x
Commandchmod 755 file

`chmod 755 file` sets `rwxr-xr-x`: only the owner can change the file, while everyone can read it and run it. It is the usual mode for directories, installed binaries and shell scripts.

What chmod 755 means

In 755 the first digit is the owner, the second the group and the third everyone else: the owner gets read, write and execute, the group gets read and execute, and others get read and execute.

In ls -l it appears as -rwxr-xr-x. The 7 is 4 + 2 + 1 and each 5 is 4 + 1, read plus execute. On a directory, read lets a user list the names inside and execute lets them traverse it to open files by path, so 755 is a directory everyone can browse but only the owner can add to or remove from.

Where 755 is the right choice

Most of /usr/bin is 755, owned by root: every user can run ls or git, nobody but root can replace them. The same applies to your own scripts in ~/bin and to web document roots, where the server must enter each directory but should not be able to rewrite the site.

It is also what mkdir produces under the common 022 umask, because new directories start from 777 and the umask removes group and other write. When a directory "looks normal" in a listing, it is usually 755.

Pitfalls

755 on a regular data file is harmless but misleading: it marks a config file or an image as executable. Use 644 for files that are only read. And 755 is readable by every account on the host, so it is the wrong mode for anything holding a secret — a directory of credentials wants 700 or 750.

Do not apply it with chmod -R 755 across a mixed tree; every file becomes executable. Use find dir -type d -exec chmod 755 {} + for directories and set files separately, or the symbolic form chmod -R u=rwX,go=rX dir, where capital X adds execute only to directories and to files that were already executable.

Related values

755 sits between two neighbours. 750 removes every bit from others, so only the owner and one group can enter; 700 goes further and keeps the directory to the owner alone. For files that are read but never run, 644 is the counterpart that drops execute everywhere. If you are tempted by 777 because a process cannot write, the problem is ownership, and 755 with the right owner is usually the answer.

FAQ

Questions, answered.

Tap a question to expand the answer.

The middle digit. 755 gives the group read and execute only; 775 also gives the group write, so any member of the file's group can modify it or, on a directory, create and delete entries. Use 775 for shared project directories with a dedicated group.

Directories 755, files 644. The web server needs execute on directories to traverse them, but a static HTML, CSS or PHP file only needs to be readable. PHP files are read by the interpreter, not executed by the kernel.

More free, private DevOps tools.

The chmod Calculator is one tool in OpsCanopy — a growing canopy of browser-based validators, converters and testers that never touch a server.

42 free tools, every one offline-capable — opscanopy.com works with no signup and nothing uploaded.

Related utilities: the UUID / ULID Generator, the Case Converter and the Slugify tool — or browse the full tools directory.

Provided as-is for convenience; always double-check permission changes on production systems. OpsCanopy is free and open.