Toolman

chmod 4755

chmod 4755 is rwsr-xr-x (with special bits).

What 4755 grants

WhoDigitPermissionsAdds up as
Owner7read, write, execute4 + 2 + 1 = 7
Group5read, execute4 + 1 = 5
Others5read, execute4 + 1 = 5
Special4setuid4000 = 4

When 4755 is the right answer

755 plus setuid: the program runs as its owner rather than as whoever executed it. This is how tools like passwd work, and it is a serious liability on anything not audited for it.

The command

chmod 4755 filename
chmod -R 4755 directory/

Because the owner has the execute bit, this works on a directory as well as a file — on a directory, execute is what grants the right to enter it and reach the entries inside.

How it is written elsewhere

Octal4755
Symbolicrwsr-xr-x
As a file in ls -l-rwsr-xr-x
As a directory in ls -ldrwsr-xr-x
Binary111 101 101
World-writableNo

Frequently asked questions

What does chmod 4755 mean?

It sets owner to read, write, execute, group to read, execute, others to read, execute, with the setuid bit set. In symbolic notation that is rwsr-xr-x.

How do I apply 4755?

Run chmod 4755 filename. Add -R to apply it to a directory and everything inside, though be careful: a recursive numeric chmod marks every file the same way, which is rarely correct for a mixed tree of files and directories.

Is 4755 safe?

Setuid means the program runs with its owner’s privileges regardless of who starts it. That is a deliberate privilege escalation and should exist only on binaries that were written to be safe under it.

What is 4755 in symbolic notation?

rwsr-xr-x. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rwsr-xr-x and a directory as drwsr-xr-x.

Other permission values

All permission values · Chmod calculator