chmod 2775 — rwxrwsr-x

2775 = rwxrwsr-x: setgid shared directory, group writable.

Updated

2775
Octal
rwxrwsr-x
Symbolic
Use with care
Security

What does chmod 2775 mean?

chmod 2775 gives setgid shared directory, group writable. A shared team directory: the group can write, and the setgid bit keeps every new file in the same group. Combine with umask 002 so new files are group-writable too.

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

Each digit is the sum of read (4), write (2) and execute (1). In ls -l the file shows as -rwxrwsr-x and a directory as drwxrwsr-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 2775

# one file or directory
chmod 2775 filename

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

# a directory and everything inside it
chmod -R 2775 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 2775 do?
It sets the permissions to rwxrwsr-x: the owner gets read, write, execute, the group read, write, execute and others read, execute.
What is 2775 in symbolic notation?
rwxrwsr-x, or chmod u=rwx,g=rwx,o=rx as a symbolic chmod command.
Is chmod 2775 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.