Guide
Understanding Linux file permissions and chmod numbers
Every file and folder on Linux and macOS carries a small set of permission bits that decide who may read it, change it or run it. They appear as strings like -rwxr-xr-x in ls -l and as numbers like 755 in chmod commands, and translating between the two in your head is where mistakes happen. This calculator lets you tick boxes, type a number or paste a string, and shows every form at once with the command to run.
Three classes, three bits
Permissions are set separately for the file’s owner, its group and everyone else. Each class has three bits: read, write and execute. In octal notation each bit has a value, read 4, write 2 and execute 1, and one digit per class is simply their sum. Read and write make 6, read and execute make 5, all three make 7. So 750 means the owner may do everything, the group may read and run, and others get nothing.
Execute on folders
On a directory the bits mean something slightly different. Read lets you list the names inside, write lets you create, rename and delete entries, and execute lets you enter the folder and reach the files in it. A folder with read but no execute shows file names but refuses to open any of them, which is why folders normally need 755 or 750 while ordinary files use 644 or 640.
The special bits
A fourth, leading digit holds three special bits. Setuid (4000) makes a program run with its owner’s rights, as passwd does. Setgid (2000) on a program runs it with the file’s group; on a folder it makes new files inherit the folder’s group, which is useful for shared project directories. The sticky bit (1000) on a folder such as /tmp lets everyone create files but only delete their own. In ls -l they appear as s or t in place of an execute bit.
Symbolic notation
chmod also accepts symbolic modes, which state the result per class: u=rwx,g=rx,o= gives the same result as 750. The calculator shows both forms. Symbolic modes are handy in scripts because they say what they mean, and forms such as g+w change one bit without touching the others.
A worked example
Type 750 and the tool shows -rwxr-x--- as the ls -l string, chmod 750 deploy.sh as the command and chmod u=rwx,g=rx,o= deploy.sh as the symbolic equivalent. Clicking the 1777 preset for shared temporary folders gives -rwxrwxrwt, where the final t marks the sticky bit, and a warning that the mode is world-writable.
umask and new files
When a program creates a file, the system starts from 666 for files and 777 for folders and removes the bits set in the process’s umask. With the common umask 022, new files are 644 and new folders 755; with 027 they are 640 and 750, which hides them from other users. The umask box shows both results.
Warnings worth reading
The calculator flags modes that let others write to a file, because anyone on the system could then change a script that someone else runs. It also flags setuid on an executable, since a setuid program with a bug becomes a privilege-escalation route, and warns about 777 in particular. Changing ownership with chown is usually the right fix when a service cannot write somewhere, rather than opening the permissions to everyone.
Related tools
- Crontab Generator schedules the scripts you just made executable.
- Linux Command Builder builds find commands to change permissions in bulk.
- SSH Config Generator sets up keys whose files need 600.
- systemd Unit Generator runs a service as its own user instead of root.
Checked against the current version of the Chmod Calculator on .

