DevToolsmith

Chmod 775

chmod 775 sets the permissions to rwxrwxr-x: it gives the owner and group full access, and others read and execute. Here is exactly what that allows on files and directories, when to use it, and the commands to apply it.

Runs 100% in your browser — nothing is uploaded

ClassreadwriteexecuteValue
owner7
group7
others5
Common:
$ chmod 775 file.sh
$ chmod u=rwx,g=rwx,o=rx file.sh
  • • The owner can read, write and execute.
  • • The group can read, write and execute.
  • • Everyone else can read and execute.

What chmod 775 means

WhoDigitLettersOn a fileOn a directory
owner 7 rwx Can read, modify and run Can list files, create, delete and rename files and enter it and open files
group 7 rwx Can read, modify and run Can list files, create, delete and rename files and enter it and open files
others 5 r-x Can read and run Can list files and enter it and open files

Each digit is the sum of read (4), write (2) and execute (1). In ls -l output it looks like this:

$ ls -l
drwxrwxr-x  2 alice  staff  4096 Oct 21 10:30 example-dir
  • The owner can read, write and execute.
  • The group can read, write and execute.
  • Everyone else can read and execute.

When to use 775

  • Shared project directories
  • Deploy directories written by a CI user and a deploy group

775 is 755 plus write access for the group. It is the standard for directories that a team edits together. Combine it with the setgid bit (chmod 2775) so new files inherit the directory’s group instead of each user’s primary group, and set umask 002 so new files are group-writable too.

775 is also the default mode for new directories, with umask 002.

Is chmod 775 safe?

Yes, for shared project directories. Other users can read and execute it, but can’t change it. Don’t use it for files that contain secrets.

Commands

# One file or directory
chmod 775 path

# Same thing in symbolic form
chmod u=rwx,g=rwx,o=rx path

# Every directory under a tree (leaves files alone)
find /path/to/dir -type d -exec chmod 775 {} +

# Check the result
stat -c '%a %A %n' path    # Linux
stat -f '%Lp %Sp %N' path  # macOS

Avoid chmod -R 775 on a whole tree: it gives files and directories the same mode. The find form above changes only directories.

Compare with similar modes

ModeSymbolicDifference
777 rwxrwxrwx Gives everyone full read, write and execute access
770 rwxrwx--- Gives the owner and group full access, and others nothing
755 rwxr-xr-x Lets the owner do everything and everyone else read and execute

Other chmod values

777 · 770 · 755 · 751 · 750 · 744 · 711 · 700 · 666 · 664 · 660 · 644 · 640 · 600 · 555 · 500 · 444 · 400 · 000 · 1777 · 2775 · 4755

Need a different combination? Use the Chmod Calculator.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does chmod 775 mean?

chmod 775 sets the permissions to rwxrwxr-x. The owner can read, write and execute. The group can read, write and execute. Everyone else can read and execute.

Is chmod 775 safe?

Yes, for shared project directories. Other users can read and execute it, but can’t change it. Don’t use it for files that contain secrets.