devkult_
tools29converters34
home/chmod

Chmod Calculator

Tick the permissions you want, or type a mode like 755 or rwxr-xr-x, and get the octal number, the ls -l form and a ready-to-paste chmod command. Everything runs in your browser.

755
-rwxr-xr-x
WhoreadwriteexecuteDigit
owner7
group5
others5

The owner can read, write and execute; the group can read and execute; everyone else can read and execute.

chmod 755 file
chmod u=rwx,g=rx,o=rx file

Read the full guide to chmod 755 →

How chmod numbers work

Each digit is a sum: read is 4, write is 2, execute is 1. The three digits apply, in order, to the file's owner, its group, and everyone else — so 754 means owner 7 (4+2+1), group 5 (4+1) and others 4. An optional fourth digit in front sets the special bits: 4 for setuid, 2 for setgid, 1 for the sticky bit.

DigitSymbolicMeaning
0---no permissions
1--xexecute only
2-w-write only
3-wxwrite and execute
4r--read only
5r-xread and execute
6rw-read and write
7rwxread, write and execute

Common modes, explained

Symbolic mode: chmod +x, u+w, go-r

Instead of a number, chmod accepts changes: who (u owner, g group, o others, a all), an operator (+ add, - remove, = set exactly) and the permissions. Symbolic changes only touch the bits you name, which makes them safer than overwriting the whole mode.

chmod +x deploy.sh        # make a script executable
chmod u+x,go-w notes.txt  # owner may execute; group/others lose write
chmod a=r report.pdf      # read-only for everyone (444)
chmod g+s shared/         # set setgid on a directory

Recursive changes, done right

chmod -R 755 makes every file executable, and chmod -R 644 locks you out of every directory. Set directories and files separately with find:

find /var/www/site -type d -exec chmod 755 {} +
find /var/www/site -type f -exec chmod 644 {} +

Frequently asked questions

What does chmod do?

chmod (change mode) sets who can read, write and execute a file or directory. Permissions are set separately for the file's owner, its group, and everyone else.

What's the difference between chmod and chown?

chmod changes what each class of user may do; chown changes who the owner and group are. Many 'Permission denied' errors are really ownership problems — fix them with chown rather than loosening permissions.

How do I see a file's current permissions?

Run ls -l file to see the symbolic form (like -rw-r--r--), or stat -c '%a %A %n' file on Linux (stat -f '%Lp %Sp %N' file on macOS) to get the octal number too.

Is 0755 different from 755?

No. The optional leading digit holds the special bits (setuid, setgid, sticky); 0 means none are set, so 0755 and 755 are the same mode.

What does chmod +x do?

It adds execute permission. With no u, g or o in front, chmod applies it to all three classes, except where your umask masks it — so chmod +x script.sh usually gives rwxr-xr-x to a 644 file. Use chmod u+x to add it for the owner only.