← All free tools

chmod Calculator

Tick the boxes, or type a number like 755 or a listing like rwxr-xr-x. You get the number, the command and what it allows.

WhoReadWriteExecute
Owner
Group
Others
Special

chmod 755 file

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

The owner can read, write and execute. The group can read and execute. Everyone else can read and execute.

How the numbers work

Each of the three digits is for one group of people: the file's owner, then the file's group, then everyone else. Add 4 for read, 2 for write and 1 for execute. So 7 is all three, 5 is read and execute, and 4 is read only (GNU manual: numeric modes).

On a directory the letters mean something a little different: read lets you list what is in it, write lets you create and remove files in it, and execute lets you reach the files inside (GNU manual: file mode bits).

Common chmod numbers

CommandListingWhat it allows
chmod 400r--------Only the owner can read it
chmod 600rw-------Only the owner can read and change it
chmod 640rw-r-----Owner reads and writes; the group reads
chmod 644rw-r--r--Owner reads and writes; everyone else reads
chmod 664rw-rw-r--Owner and group read and write; others read
chmod 700rwx------Only the owner can use it
chmod 750rwxr-x---Owner does everything; the group reads and runs it
chmod 755rwxr-xr-xOwner does everything; everyone else reads and runs it
chmod 775rwxrwxr-xOwner and group do everything; others read and run it
chmod 777rwxrwxrwxAnyone can read, change and run it

What chmod 755 means

755 is rwxr-xr-x: the owner can do everything, and everyone else can read and execute but not change it. You will often see it on programs, scripts and directories that others need to use but not edit.

What chmod 777 means, and why to avoid it

777 is rwxrwxrwx: every user on the machine can change the file and run it. On a directory, anyone can add and remove files in it. When something fails with "permission denied", 777 hides the cause and opens the file to everyone. Find out which user needs access, then give that user or its group only what it needs.

The special bits

A fourth digit in front holds three more: 4 is set-user-ID, 2 is set-group-ID and 1 is the sticky bit. A listing shows them where an x would be: s or t when execute is also on, S or T when it is not (GNU manual: what ls lists). On directories, GNU chmod treats the set-user-ID and set-group-ID bits as a special case with short numbers, so check the result with ls -l.

Try it on a real machine

The file permissions lab gives you a task on a real Linux machine in your browser and checks your work. Or open the free Linux terminal and try ls -l and chmod yourself.

Career Coach
Career Coach

Ask anything about finding a job: what to apply for, your resume, an interview, pay. The coach is an AI model, and it answers at any hour.

One question free, no account needed.

Your question is sent to an AI model. It can be wrong: check anything that matters before you act on it. It cannot apply or send anything for you.