# chmod 2775 — What It Means & When to Use It

> 775 plus setgid: new files inherit the directory's group. Symbolic: `rwxrwsr-x` · Use with care.

2775 is 775 with the setgid bit set on a directory. Files and subdirectories created inside it inherit the directory's group instead of the creator's primary group, and new subdirectories inherit the setgid bit too. In `ls -l` the group's x becomes an s: `rwxrwsr-x`.

It's what makes a shared team folder keep working — without it, each new file ends up in its creator's personal group and teammates can't edit it.

## Permission by permission

| Who | Permissions |
|---|---|
| owner | read, write and execute |
| group | read, write and execute |
| others | read and execute |

Symbolic chmod argument: `u=rwx,g=rwx,o=rx,g+s`

## Use it for

- Shared project directories for a group of users.
- Web directories written by both a deploy user and the web server's group.

## Avoid it for

- Directories where others shouldn't read anything: use `2770`.
- Remember users' umask still applies: set it to `002` so new files are group-writable.

## FAQ

### How do I set up a shared folder on Linux?

Create a group, add the users, then chgrp -R team /srv/shared and chmod 2775 /srv/shared. Make sure the users' umask is 002 so their files are group-writable.

## Related modes

- [chmod 775](https://www.devkult.com/chmod/775.md): Owner and group can do everything; others can read and execute
- [chmod 4755](https://www.devkult.com/chmod/4755.md): 755 plus setuid: the program runs with its owner's privileges
- [chmod 1777](https://www.devkult.com/chmod/1777.md): 777 plus the sticky bit: anyone can create, only owners can delete
- [chmod 664](https://www.devkult.com/chmod/664.md): Owner and group can read and write; others can read

Open the interactive page: https://www.devkult.com/chmod/2775