chmod 1777

chmod 1777 gives rwxrwxrwt. Everyone can create files, but only the owner can delete or rename them (the sticky bit). The mode of /tmp.

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

Owner

Group

Others

Permissions

rwxrwxrwt

Anyone Can Write

Command

chmod 1777 file

Chmod Calculator

chmod 1777 explained

Octal1777
Symbolicrwxrwxrwt
Ownerread, write, execute
Groupread, write, execute
Othersread, write, execute
Special Bitssticky
ls -l Shows-rwxrwxrwt
Commandchmod 1777 file
Symbolic Commandchmod u=rwx,g=rwx,o=rwx file

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

Everyone can create files, but only the owner can delete or rename them (the sticky bit). The mode of /tmp.

1777 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 1777, change the owner with chown instead.

Questions

What does chmod 1777 mean?
Owner: read, write, execute. Group: read, write, execute. Others: read, write, execute. The leading 1 adds the sticky bit. In letters: rwxrwxrwt.
Is chmod 1777 safe?
Not for ordinary files: anyone on the server can change them. With the sticky bit it is the correct mode for shared temporary directories such as /tmp.
How do I apply 1777 to every directory but not files?
find /path -type d -exec chmod 1777 {} + (and use -type f for files only).
How do I set 1777 recursively?
chmod -R 1777 /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.