What is the correct permission for /tmp directory?

Solution Verified - Updated -

Red Hat Lightspeed can detect this issue

Proactively detect and remediate issues impacting your systems.
View matching systems and remediation

Environment

  • Red Hat Enterprise Linux

Issue

  • What are the correct permissions required for the /tmp directory?
  • I changed permissions from the default on /tmp. How can I reset these permissions?

Resolution

Root Cause

  • The /tmp directory requires special permissions. This directory has Sticky Bit permissions.

  • Many applications will show errors or fail if they are not able to write to /tmp with 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