breakitdown

chmod 775 (rwxrwxr-x)

Answer

chmod 775 sets rwxrwxr-x: the owner and the group can read, write and execute (on a directory: list, enter, and create or delete entries), and everyone else can read and execute only.

Try

chmod 775 = rwxrwxr-x: owner full access, group full access, others read and execute.

Read 4Write 2Execute 1Digit
Owner (user)7
Group7
Others5
Special0
  1. 7
    Owner (user): 7 = 4 read + 2 write + 1 execute
  2. 7
    Group: 7 = 4 read + 2 write + 1 execute
  3. 5
    Others: 5 = 4 read + 1 execute

On a file

  • Owner (user) read it, change it and run it as a program
  • Group read it, change it and run it as a program
  • Others read it and run it as a program

On a directory

  • Owner (user) list the names inside, enter it and open files by name, create and rename and delete entries
  • Group list the names inside, enter it and open files by name, create and rename and delete entries
  • Others list the names inside and enter it and open files by name

chmod 775 filechmod u=rwx,g=rwx,o=rx filels -l → -rwxrwxr-x

What to know

775 is the shared-group version of 755. It is what new directories get under umask 002.

For a directory several people write to, 775 alone is not enough: each new file gets its creator's primary group, so others in the team may be unable to edit it. Adding the setgid bit (2775) makes new entries inherit the directory's group.

Where it fits

Gotchas

Related explainers

← chmod calculator