• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

UNIX / Linux : What is the correct permission of /tmp and /var/tmp directories

by admin

What are the correct permissions required for the /tmp and /var/tmp directories?

Answer

The /tmp and /var/tmp directories 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.

# ls -ld /tmp
drwxrwxrwt 21 root root 12288 Apr 28 16:18 /tmp

The ‘t’ at the end symbolizes that the sticky bit is set. A file created in the /tmp directory can only be removed by its owner, or the root user.

Setting up the permissions

Change the permissions on the directory by running either the following commands:

# chmod 1777 /tmp

or

# chmod a+trwx /tmp

Filed Under: Linux

Some more articles you might also be interested in …

  1. auracle Command Examples
  2. hostnamectl Command Examples in Linux
  3. How To Configure Timeout On SSH Client Putty
  4. grub-script-check Command Examples in Linux
  5. How to view file size/details from ls command in Unix
  6. How to uninstall certbot software package in Ubuntu
  7. locate Command Examples in Linux
  8. lvm: command not found
  9. lvextend: command not found
  10. wg: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright