Kitloft

All tools / chmod reference

chmod 2755 (rwxr-sr-x)

Like 755, with setgid: files created inside a directory inherit the directory's group.

chmod 2755 in symbolic form
rwxr-sr-x

Who can do what

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

Commands

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

In ls -l output, a file with this mode shows as -rwxr-sr-x and a directory as drwxr-sr-x.

Try a different mode

ReadWriteExecuteSpecial
Owner
Group
Others
Octal Symbolic
Command