chmod 664

chmod 664 gives rw-rw-r--. Like 644, but the group can write too. Files a team edits together; the default for many systems with user private groups.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Owner

Group

Others

Permissions

rw-rw-r--

Command

chmod 664 file

Chmod Calculator

chmod 664 explained

Octal664
Symbolicrw-rw-r--
Ownerread, write
Groupread, write
Othersread
ls -l Shows-rw-rw-r--
Commandchmod 664 file
Symbolic Commandchmod u=rw,g=rw,o=r file

Each digit of 664 is one class of user and adds up read (4), write (2) and execute (1). 6 for the owner is read, write; 6 for the group is read, write; 4 for the others is read.

Like 644, but the group can write too. Files a team edits together; the default for many systems with user private groups.

On a directory, execute means permission to enter it and reach files inside; read means permission to list it. That is why directories usually have execute wherever they have read.

Questions

What does chmod 664 mean?
Owner: read, write. Group: read, write. Others: read. In letters: rw-rw-r--.
Is chmod 664 safe?
Yes, for the uses described here. Nobody outside the classes given write access can change the file.
How do I apply 664 to every directory but not files?
find /path -type d -exec chmod 664 {} + (and use -type f for files only).
How do I set 664 recursively?
chmod -R 664 /path. Be careful: this gives files and directories the same mode, which is rarely what you want; the find command above is safer.

Run servers for other people?

Frabs stops the abuse their VMs send out, and keeps your network off blocklists.