Kitloft

All tools / chmod reference

chmod 4755 (rwsr-xr-x)

Like 755, with setuid: the program runs with its owner's privileges. /usr/bin/passwd uses this to update /etc/shadow.

chmod 4755 in symbolic form
rwsr-xr-x

Who can do what

ReadWriteExecute
Owner✓✓✓
Group✓–✓
Others✓–✓

Commands

Set the mode
chmod 4755 my-file
# same thing in symbolic form:
chmod u=rwxs,g=rx,o=rx my-file

In ls -l output, a file with this mode shows as -rwsr-xr-x and a directory as drwsr-xr-x.

Try a different mode

ReadWriteExecuteSpecial
Owner
Group
Others
Octal Symbolic
Command