chmod 1777 Permission Explained: Sticky World-Writable Directory
Summary: Anyone can create files; only the owner can delete their own.
| Class | Read (4) | Write (2) | Execute (1) | Octal |
|---|---|---|---|---|
| Owner (u) | 7 | |||
| Group (g) | 7 | |||
| Others (o) | 7 |
chmod 1777 filename
chmod 1777 Breakdown
| Class | Digit | Symbolic | On a file | On a directory |
|---|---|---|---|---|
| Owner (u) | 7 |
rwx |
Full access | Full access: list, enter, create, delete |
| Group (g) | 7 |
rwx |
Full access | Full access: list, enter, create, delete |
| Others (o) | 7 |
rwx |
Full access | Full access: list, enter, create, delete |
| Special | 1 |
— | sticky bit (restricted deletion) | |
Is chmod 1777 Safe?
Moderate
- World-writable, but the sticky bit stops users from deleting each other's files (typical for /tmp).
- Every member of the group can modify this file.
- Any user can read this file — never use it for secrets such as keys or .env files.
When not to use it
- Regular application folders, source trees, or private data storage
Common Use Cases
- Public system temporary directories such as /tmp and /var/tmp
- Shared dropboxes where all users must create temporary data
chmod 1777 Command Examples
# Apply using octal mode
chmod 1777 filename
# Apply using equivalent symbolic mode
chmod u=rwx,g=rwx,o=rwx,+t filename
# Recursive command warning:
chmod -R 1777 /path/to/dir
# Note: -R applies the same mode to files and directories. Use find to treat them separately:
find /path/to/dir -type d -exec chmod 1777 {} +
# Verify permissions
stat -c '%a %A %n' filename # Linux
stat -f '%Lp %Sp %N' filename # macOS
# Example ls -l output:
-rwxrwxrwt 1 alice staff 1024 Jan 15 10:00 example.txt
umask Relationship
A umask of 000 makes new directories 1777. Test umask values with our interactive Umask Calculator.
Frequently Asked Questions
What does chmod 1777 mean?
Anyone can create files; only the owner can delete their own. In octal notation, the owner receives 7 (read/write/execute), the group receives 7 (read/write/execute), and others receive 7 (read/write/execute).
Is chmod 1777 safe?
chmod 1777 is classified as Moderate. World-writable, but the sticky bit stops users from deleting each other's files (typical for /tmp).
What is chmod 1777 in symbolic notation?
In symbolic notation, chmod 1777 is represented as rwxrwxrwt. You can apply this permission using the equivalent symbolic command "chmod u=rwx,g=rwx,o=rwx,+t filename".
What does the t in drwxrwxrwt mean?
The lowercase "t" at the end of the permissions string indicates that the sticky bit is active on a directory where others also possess execute permission (1777). In a sticky directory, although any user can create new files, users can only delete, rename, or overwrite files that they personally own or where they have root privileges.
Related Permissions
Change one bit: