chmod 666

chmod 666 gives rw-rw-rw-. Read and write for everyone. Fine for /dev/null and /dev/tty; on a normal file anyone on the server can change it.

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

Owner

Group

Others

Permissions

rw-rw-rw-

Anyone Can Write

Command

chmod 666 file

Chmod Calculator

chmod 666 explained

Octal666
Symbolicrw-rw-rw-
Ownerread, write
Groupread, write
Othersread, write
ls -l Shows-rw-rw-rw-
Commandchmod 666 file
Symbolic Commandchmod u=rw,g=rw,o=rw file

Each digit of 666 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; 6 for the others is read, write.

Read and write for everyone. Fine for /dev/null and /dev/tty; on a normal file anyone on the server can change it.

666 lets every user on the server write to the file. On a web server that is how one compromised site or plug-in spreads to others. If something only works with 666, change the owner with chown instead.

Questions

What does chmod 666 mean?
Owner: read, write. Group: read, write. Others: read, write. In letters: rw-rw-rw-.
Is chmod 666 safe?
Not for ordinary files: anyone on the server can change them.
How do I apply 666 to every directory but not files?
find /path -type d -exec chmod 666 {} + (and use -type f for files only).
How do I set 666 recursively?
chmod -R 666 /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.