Nov 10, 2018

Permissions of /tmp folder in linux

The normal settings for /tmp are 1777, which ls shows as drwxrwxrwt. That is: wide open, except that only the owner of a file can remove it.  That's what this extra t bit means for a directory.

The problem with a /tmp with mode 777 is that another user could remove a file that you've created and substitute the content of their choice.