Andrey Rakhmatullin <w...@debian.org> writes:
> On Mon, May 06, 2024 at 10:40:00AM +0200, Michael Biebl wrote:

>> I'm not sure if we have software on long running servers which place
>> files in /tmp and /var/tmp and expect files to not be deleted during
>> runtime, even if not accessed for a long time. This is certainly an
>> issue to be aware of and keep an eye on.

> Note that FHS mandates it for /var/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."

It mandates that it not be cleaned on *boot*.  Not that it never be
cleaned during runtime.  It anticipates that it be cleaned periodically,
just less frequently than /tmp.

There is a specific prohibition against clearing /var/tmp on reboot
because /var/tmp historically has been used to store temporary files whose
whole reason for existence is that they need to survive a reboot, such as
vi recover files, but are still safe to delete periodically.

Historically, deleting anything in /var/tmp that hadn't been accessed in
over seven days was a perfectly reasonable and typical configuration.
These days, we have the complication that it's fairly common to turn off
atime updates for performance reasons, which makes it a bit harder to
implement that policy when /var/tmp isn't its own partition and thus
inherits that setting from the rest of the system.

-- 
Russ Allbery (r...@debian.org)              <https://www.eyrie.org/~eagle/>

Reply via email to