Linux file permissions

chmod 1777 (rwxrwxrwt)

Owner: read, write, execute · Group: read, write, execute · Others: read, write, execute

1777numeric
rwxrwxrwtsymbolic
7 · 7 · 7owner · group · others
Commands
chmod 1777 filename chmod u=rwx,g=rwx,o=rwx filename # plus +t chmod -R 1777 folder/ # apply to a folder and everything in it

Change any permission with the chmod calculator.

What chmod 1777 means

WhoDigitLettersCan
Owner (user)7rwxread, write, execute
Group7rwxread, write, execute
Others7rwtread, write, execute

Each digit is the sum of read (4), write (2) and execute (1). The leading 1 is a special bit: the sticky bit — in a shared folder only a file’s owner can delete or rename it.

When to use 1777

Shared temporary folders like /tmp: everyone can write, only owners can delete their files.

Related permissions

Questions

What does chmod 1777 mean?

chmod 1777 sets the permissions to rwxrwxrwt: the owner can read, write, execute, the group can read, write, execute and others can read, write, execute. The leading digit sets special bits (sticky).

When should I use 1777?

Shared temporary folders like /tmp: everyone can write, only owners can delete their files.

What is 1777 in symbolic form?

1777 is rwxrwxrwt (shown by ls -l as -rwxrwxrwt for a file or drwxrwxrwt for a folder). The symbolic chmod command is chmod u=rwx,g=rwx,o=rwx file.