What chmod 777 means
chmod 777 gives the owner, the group and everyone else read, write and execute access. The symbolic form is rwxrwxrwx. It fixes a permission denied error by removing all limits, which is rarely the right fix.
Last reviewed 2026-11-04.
| Who | Read | Write | Execute | Special |
|---|---|---|---|---|
| Owner (u) | ||||
| Group (g) | ||||
| Others (o) |
What it does, class by class
- Owner: read, write, execute.
- Group: read, write, execute.
- Others: read, write, execute.
- Warning from the calculator: Anyone on the system can write to this. Avoid world-writable modes outside shared directories with the sticky bit.
Worked example
A web app cannot write to uploads/. The 777 shortcut works but lets every account on the machine change that folder. Find who needs access and grant only that:
$ ls -ld uploads
sudo chown www-data:www-data uploads
chmod 755 uploads # owner writes, others read
chmod 775 uploads # or: group also writesWhat to use instead
- 755 for directories and programs, 644 for plain files. See 755 vs 644.
- 775 when a trusted group must also write.
- 700 or 600 when only the owner should touch it.
- A shared drop directory that really must be world-writable should also set the sticky bit:
chmod 1777, as /tmp does.
Running this on a server
World-writable files on a server are an easy way to get compromised. On a VPS you control the users and groups; the hosting guide covers when a managed host is the safer fit.
Frequently asked questions
Is chmod 777 ever correct?
On a directory with the sticky bit (1777), as in /tmp, where many users need to create files. On regular project files, no.
Why does permission denied persist after chmod 777?
A parent directory may lack the execute bit, the filesystem may be mounted read-only, or SELinux or AppArmor may be blocking access.
What should I use instead of 777 for a shared upload folder?
Give the web server user ownership and use 755, or put it in a group and use 775.
Sources
- chmod(1) manual page checked 2026-11-04
- GNU Coreutils: Mode structure checked 2026-11-04