chmod 4755

chmod 4755 gives rwsr-xr-x. Like 755, and the program runs with its owner's rights (setuid). How passwd and sudo work; risky on anything else.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Owner

Group

Others

Permissions

rwsr-xr-x

Command

chmod 4755 file

Chmod Calculator

chmod 4755 explained

Octal4755
Symbolicrwsr-xr-x
Ownerread, write, execute
Groupread, execute
Othersread, execute
Special Bitssetuid
ls -l Shows-rwsr-xr-x
Commandchmod 4755 file
Symbolic Commandchmod u=rwx,g=rx,o=rx file

Each digit of 755 is one class of user and adds up read (4), write (2) and execute (1). 7 for the owner is read, write, execute; 5 for the group is read, execute; 5 for the others is read, execute.

Like 755, and the program runs with its owner's rights (setuid). How passwd and sudo work; risky on anything else.

On a directory, execute means permission to enter it and reach files inside; read means permission to list it. That is why directories usually have execute wherever they have read.

Questions

What does chmod 4755 mean?
Owner: read, write, execute. Group: read, execute. Others: read, execute. The leading 4 adds setuid. In letters: rwsr-xr-x.
Is chmod 4755 safe?
Only for programs designed to run setuid. Any bug in them can give a user the owner's rights.
How do I apply 4755 to every directory but not files?
find /path -type d -exec chmod 4755 {} + (and use -type f for files only).
How do I set 4755 recursively?
chmod -R 4755 /path. Be careful: this gives files and directories the same mode, which is rarely what you want; the find command above is safer.

Run servers for other people?

Frabs stops the abuse their VMs send out, and keeps your network off blocklists.