chmod 4755 — rwsr-xr-x
What chmod 4755 allows, when to use it, and the calculator pre-filled with it — toggle any box to compare.
rwsr-xr-xrwxr-xr-xchmod 4755 filenamechmod -R 4755 /path/to/dirWhat this means
Owner can read, write, execute. Group can read, execute. Others can read, execute.
What chmod 4755 allows
| Who | Read | Write | Execute |
|---|---|---|---|
| Owner | ✓ | ✓ | ✓ |
| Group | ✓ | — | ✓ |
| Others | ✓ | — | ✓ |
- • setuid (4): the program runs with the file owner's privileges.
setuid: the program runs with its owner's rights (often root), like /usr/bin/passwd. Powerful and risky — only for well-audited binaries.
Commands
chmod 4755 fileset it on one file or directorychmod u=rwxs,g=rx,o=rx filethe same thing in symbolic formchmod -R 4755 dir/recursively — careful: it applies to files and directories alikels -l filecheck the result: -rwsr-xr-x (a directory shows drwsr-xr-x)On a directory, read lets you list it, write lets you create and delete entries, and execute lets you enter it and open what's inside. That's why directories usually get 755 or 750 while files get 644 or 640.
Frequently asked
What does chmod 4755 mean?
Owner: read, write, execute. Group: read, execute. Others: read, execute. setuid (4): the program runs with the file owner's privileges. In ls -l it shows as rwsr-xr-x.
What is the symbolic form of chmod 4755?
chmod u=rwxs,g=rx,o=rx file — it sets exactly the same permissions as chmod 4755.