|
|
Log in / Subscribe / Register

/tmp and /var/tmp

/tmp and /var/tmp

Posted Mar 31, 2011 17:54 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)
In reply to: /tmp and /var/tmp by vonbrand
Parent article: Introducing /run

Whiskey Tango Foxtrot?

Sticky bit for directories was specifically invented for the world-writable /tmp. Also, where should user processes store their temporary data (for example, if a user opens a .tgz file in Nautilus)?

/home might be on a slow NFS link, so it's an incorrect answer.


to post comments

/tmp and /var/tmp

Posted Mar 31, 2011 19:43 UTC (Thu) by vonbrand (subscriber, #4458) [Link] (1 responses)

The user temporary files are supposed to go in /var/tmp

/tmp and /var/tmp

Posted Mar 31, 2011 19:56 UTC (Thu) by martinfick (subscriber, #4455) [Link]

Where do you get that rationale from? The FHS does not think so:

  • /tmp : Temporary files Purpose

      The /tmp directory must be made available for programs that require temporary files. Programs must not assume that any files or directories in /tmp are preserved between invocations of the program. Tip Rationale

      IEEE standard P1003.2 (POSIX, part 2) makes requirements that are similar to the above section. Although data stored in /tmp may be deleted in a site-specific manner, it is recommended that files and directories located in /tmp be deleted whenever the system is booted.

      FHS added this recommendation on the basis of historical precedent and common practice, but did not make it a requirement because system administration is not within the scope of this standard.

  • /var/tmp : Temporary files preserved between system reboots Purpose
    • The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp. Files and directories located in /var/tmp must not be deleted when the system is booted. Although data stored in /var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than /tmp.


    Copyright © 2026, Eklektix, Inc.
    Comments and public postings are copyrighted by their creators.
    Linux is a registered trademark of Linus Torvalds