/tmp should not exist

I commented on Lobsters that /tmp is usually a bad idea, which caused some surprise. I suppose /tmp security bugs were common in the 1990s when I was learning Unix, but they are pretty rare now so I can see why less grizzled hackers might not be familiar with the problems.

I guess that’s some kind of success, but sadly the fixes have left behind a lot of scar tissue because they didn’t address the underlying problem: /tmp should not exist.

↫ Tony Finch

Not only is this an excellent, cohesive, and convincing argument against the existence of /tmp, it also contains some nice historical context as to why things are the way they are. Even without the arguments against /tmp, though, it just seems entirely more logical, cleaner, and sensible to have /tmp directories per user in per user locations. While I never would’ve been able to so eloquently explain the problem as Finch does, it just feels wrong to have every user resort to the exact same directory for temporary files, like a complex confluence of bad decisions you just know is going to cause problems, even if you don’t quite understand the intricate interplay.

17 Comments

  1. 2024-10-22 9:05 pm
    • 2024-10-25 4:35 am
  2. 2024-10-22 10:27 pm
  3. 2024-10-23 12:16 am
    • 2024-10-23 1:40 am
    • 2024-10-23 2:09 am
      • 2024-10-23 8:58 am
        • 2024-10-23 4:36 pm
          • 2024-10-23 5:34 pm
  4. 2024-10-23 5:20 am
    • 2024-10-23 8:09 am
      • 2024-10-23 9:50 am
        • 2024-10-23 11:10 am
  5. 2024-10-23 10:31 am
  6. 2024-10-24 1:55 pm
  7. 2024-10-27 3:57 pm
  8. 2024-10-28 6:05 pm