chmod Calculator
Convert between octal, symbolic and ls -l notation; tick the permission bits and get the chmod command, with setuid / setgid / sticky support.
How to Use
- Enter any notation
755, 4755, rwxr-xr-x or -rwxr-xr-x all work; the other forms fill in automatically and invalid input gets a clear message.
- Or tick the bits
Nine rwx boxes plus three special bits — ticking them syncs the octal field, which makes each bit's meaning concrete.
- Copy and double-check
Two commands are shown, numeric and symbolic, with a bit-by-bit breakdown so you can verify before running them.
FAQ
What is the real difference between 755 and 777?
The others digit. 755 gives the owner read, write and execute while group and others get read and execute only; 777 lets all three classes write. For a directory, write means the ability to create and delete files, so a web root at 777 lets anyone drop a script in — a privilege-escalation entry point. The usual convention is 755 for directories and 644 for files.
Why does my setuid bit do nothing?
Two usual causes: the filesystem was mounted with nosuid (common on cloud data volumes), or the file is a script starting with #! — Linux deliberately ignores setuid on scripts for security. Only compiled binaries actually honour it.
Lowercase s versus uppercase S?
Lowercase s means setuid plus execute permission (rws); uppercase S means setuid without execute (rwS). The latter is effectively useless because a file without execute permission cannot run. An uppercase letter is a sign of a misconfiguration.
Is chmod 755 the same as chmod u=rwx,g=rx,o=rx?
For the ordinary permission bits, yes. But symbolic notation also clears bits you did not mention: u=rwx wipes setuid, whereas chmod 755 only rewrites the low nine bits and leaves setuid in place. For files with special bits the numeric form is safer.