chmod 664 — rw-rw-r--

664 = rw-rw-r--: owner and group read/write, others read.

Updated

664
Octal
rw-rw-r--
Symbolic
Use with care
Security

What does chmod 664 mean?

chmod 664 gives owner and group read/write, others read. Like 644 but the group can also write. Common default for files created by users in collaborative setups (umask 002), for example in shared Git working copies.

WhoDigitSymbolicPermissions
Owner (user)6rw-read, write
Group6rw-read, write
Others4r--read

Each digit is the sum of read (4), write (2) and execute (1). In ls -l the file shows as -rw-rw-r--.

How to use chmod 664

# one file or directory
chmod 664 filename

# the same permissions in symbolic form
chmod u=rw,g=rw,o=r filename

# a directory and everything inside it
chmod -R 664 directory/

# only regular files
find path/ -type f -exec chmod 664 {} +

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 664 do?
It sets the permissions to rw-rw-r--: the owner gets read, write, the group read, write and others read.
What is 664 in symbolic notation?
rw-rw-r--, or chmod u=rw,g=rw,o=r as a symbolic chmod command.
Is chmod 664 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.