Skip to the content

chmod 775

The owner and the group can do everything, others can read and execute. The mode for a directory that several people work in.

Read (4)Write (2)Execute (1)Digit
Owner7
Group7
Others5

A program runs with the rights of the file's owner.

A program runs with the file's group. In a directory, new files get the directory's group.

In a directory, users can't delete or rename each other's files.

Owner and group can read, write and execute. Others can read and execute.

chmod 775 file
chmod u=rwx,g=rwx,o=rx file

Common values

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What 775 allows

WhoDigitOn a fileOn a directory
Owner7 rwxread, change and runlist, enter, add and remove files
Group7 rwxread, change and runlist, enter, add and remove files
Others5 r-xread and runlist and enter

ls -l shows this mode as -rwxrwxr-x on a file and as drwxrwxr-x on a directory.

It is 755 with write permission for the group added. The owner and the members of the group can change things, everyone else can only look.

Where it belongs

A directory that several people work in: a shared project folder, or a website that both you and the deploy account have to be able to write to. Put everyone who needs access in one group and give the directory to that group:

chgrp -R developers /srv/project
chmod 775 /srv/project

Two things that make it work

New files should belong to the group too. The setgid bit on the directory takes care of that: with chmod 2775, whatever is created inside inherits the directory's group and not the group of whoever made it.

Whether those new files can be edited by the others depends on each person's umask. With 022 a new file is 644 and the rest of the group can only read it. With 002 it is 664. Systems that give every user a group of their own often set 002 for that reason.

When 755 is enough

If only one account ever writes there, the group doesn't need write permission. 775 makes sense when the group really contains people or programs that are supposed to change things.

The chmod calculator explains how the digits are built, and what setuid, setgid and the sticky bit add to them.

See all 12