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

> 777 plus the sticky bit: anyone can create, only owners can delete. Symbolic: `rwxrwxrwt` · Use with care.

1777 is 777 with the sticky bit set on a directory. Anyone can create files in it, but a file can only be renamed or deleted by its owner, the directory's owner, or root. In `ls -l` the last x becomes a t: `rwxrwxrwt`.

It's the mode of `/tmp` and `/var/tmp`, and the correct mode for any world-writable shared directory.

## 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,+t`

## Use it for

- `/tmp`-style directories that every user writes to.
- Shared drop folders where users must not delete each other's files.

## Avoid it for

- Anywhere a narrower group would do: a group-owned `2775` directory is easier to reason about.
- Remember files created inside still get their creator's umask — the sticky bit only controls deletion.

## FAQ

### What does the t in drwxrwxrwt mean?

The sticky bit. On a directory, it limits deleting and renaming entries to their owners. A capital T means sticky is set but others' execute isn't.

### How do I fix /tmp permissions?

Run chmod 1777 /tmp as root. Many programs fail or refuse to start when /tmp isn't world-writable with the sticky bit.

## Related modes

- [chmod 777](https://www.devkult.com/chmod/777.md): Everyone can read, write and execute
- [chmod 2775](https://www.devkult.com/chmod/2775.md): 775 plus setgid: new files inherit the directory's group
- [chmod 4755](https://www.devkult.com/chmod/4755.md): 755 plus setuid: the program runs with its owner's privileges

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