Browse - Computer Tips - What permissions should the /tmp folder have and how do I set it?Date: 2011mar8 OS: Linux Q. What permissions should the /tmp folder have and how do I set it? A. On a properly set up systemls -ld /tmp /var/tmpwill yielddrwxrwxrwt. 13 root root 40960 Mar 8 11:47 /tmp/ drwxrwxrwt. 2 root root 4096 Mar 8 01:11 /var/tmp/If your folders (directories) don't have these permissions, correct them like this:chmod a+rwxt /tmp /var/tmpThe t is a special flag for temporary folders. Chmod's man page says:The restricted deletion flag or sticky bit is a single bit, whose interpretation depends on the file type. For directories, it prevents unprivileged users from removing or renaming a file in the directory unless they own the file or the directory; this is called the restricted deletion flag for the directory, and is commonly found on world-writable directories like /tmp. For regular files on some older systems, the bit saves the program's text image on the swap device so it will load more quickly when run; this is called the sticky bit. Add a commentSign in to add a comment![]()
|