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.
| Who | Digit | Symbolic | Permissions |
|---|---|---|---|
| Owner (user) | 6 | rw- | read, write |
| Group | 6 | rw- | read, write |
| Others | 4 | r-- | 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.
Häufige Fragen
What does chmod 664 do?
What is 664 in symbolic notation?
rw-rw-r--, or chmod u=rw,g=rw,o=r as a symbolic chmod command.