chmod 2755 — rwxr-sr-x

2755 = rwxr-sr-x: setgid directory, owner full, others read/execute.

Updated

2755
Octal
rwxr-sr-x
Symbolic
Use with care
Security

What does chmod 2755 mean?

chmod 2755 gives setgid directory, owner full, others read/execute. The setgid bit (2) on a directory makes new files inherit the directory’s group instead of the creator’s primary group — useful for shared project folders. On executables it runs the program with the file’s group.

WhoDigitSymbolicPermissions
Owner (user)7rwxread, write, execute
Group5r-xread, execute
Others5r-xread, execute

Each digit is the sum of read (4), write (2) and execute (1). In ls -l the file shows as -rwxr-sr-x and a directory as drwxr-sr-x.

The special bit

The leading 2 sets setgid (2). In ls -l it shows as s in the group’s execute position.

How to use chmod 2755

# one file or directory
chmod 2755 filename

# the same permissions in symbolic form
chmod u=rwx,g=rx,o=rx filename

# a directory and everything inside it
chmod -R 2755 directory/

Need a different combination? Tick the boxes in the chmod calculator to get the octal and symbolic values instantly.

Chmod calculatorToggle read, write and execute for owner, group and others to build any permission.
Open the calculator

Frequently asked questions

What does chmod 2755 do?
It sets the permissions to rwxr-sr-x: the owner gets read, write, execute, the group read, execute and others read, execute.
What is 2755 in symbolic notation?
rwxr-sr-x, or chmod u=rwx,g=rx,o=rx as a symbolic chmod command.
Is chmod 2755 safe?
It is fine in controlled setups, but it grants write access beyond the owner — make sure the group (or everyone, for the sticky bit) is intended.