# chmod 777 — What It Means & When to Use It

> Everyone can read, write and execute. Symbolic: `rwxrwxrwx` · Dangerous — avoid on real systems.

777 is the most permissive mode there is: owner, group and every other user on the system can read, modify, delete and execute the file, or create and remove anything inside the directory.

It's often suggested as a quick fix for 'Permission denied', and it does make the error go away — by removing all protection. The real problem is almost always ownership, which `chown` fixes properly.

## Permission by permission

| Who | Permissions |
|---|---|
| owner | read, write and execute |
| group | read, write and execute |
| others | read, write and execute |

Symbolic chmod argument: `u=rwx,g=rwx,o=rwx`

## Use it for

- Almost nothing permanent. At most, a brief local experiment to confirm a problem is permissions-related — then revert.
- Shared scratch directories should be `1777` (sticky), not 777, so users can't delete each other's files.

## Avoid it for

- Web roots and upload folders: any process — including a compromised plugin — can plant or alter executable code. Use `755`/`644` with the right owner instead.
- Anything on a multi-user or internet-facing server.
- SSH directories and keys — OpenSSH refuses to use keys with permissions this open.

## FAQ

### Is chmod 777 safe?

No. Every user and every process on the machine can modify or replace the file. On a web server, that turns any small compromise into full control of your site.

### Why does chmod 777 fix my 'Permission denied' error?

Because it grants everything to everyone. The usual real cause is that the process runs as a different user than the file's owner. Fix it with chown (for example chown -R www-data: /var/www/app) and keep 755/644.

### What should I use instead of 777?

755 for directories and 644 for files is the standard. If several users need to write, put them in a shared group and use 775 and 664, with setgid on the directory (2775).

## Related modes

- [chmod 755](https://www.devkult.com/chmod/755.md): Owner can do everything; group and others can read and execute
- [chmod 775](https://www.devkult.com/chmod/775.md): Owner and group can do everything; others can read and execute
- [chmod 1777](https://www.devkult.com/chmod/1777.md): 777 plus the sticky bit: anyone can create, only owners can delete
- [chmod 666](https://www.devkult.com/chmod/666.md): Everyone can read and write; nobody can execute

Open the interactive page: https://www.devkult.com/chmod/777