What is the correct permission for /tmp directory?
Red Hat Lightspeed can detect this issue
Environment
- Red Hat Enterprise Linux
Issue
- What are the correct permissions required for the
/tmpdirectory? - I changed permissions from the default on
/tmp. How can I reset these permissions?
Resolution
-
Change the permissions on the directory by running either the following commands:
# chmod 1777 /tmpor
# chmod a+trwx /tmp -
For general information on permissions and how to set them see:
Root Cause
-
The
/tmpdirectory requires special permissions. This directory has Sticky Bit permissions. -
Many applications will show errors or fail if they are not able to write to
/tmpwith the appropriate permissions.
Diagnostic Steps
-
Check the permissions on
/tmp, which by default should be:# ls -ld /tmp drwxrwxrwt 4 root root 4096 Apr 6 04:02 tmp -
The 't' at the end of the permissions signifies the Sticky Bit.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments