#1106878 libpam-tmpdir: tmpfiles.d file does not result in tempfiles being cleaned on boot

Package:
libpam-tmpdir
Source:
libpam-tmpdir
Description:
automatic per-user temporary directories
Submitter:
brian m. carlson
Date:
2025-06-12 04:57:01 UTC
Severity:
normal
#1106878#5
Date:
2025-05-31 00:35:22 UTC
From:
To:
libpam-tmpdir ships the file `/usr/lib/tmpfiles.d/libpam-tmpdir.conf`
with the following contents:
----
#
# Ensure /tmp/user exists with strict permissions.
#
# If you want more lenient permissions, feel free to change this to 0755.

d /tmp/user 0711 root root -
----

The `d` at the beginning of the line indicates that this directory
should be created, but it is not cleaned on boot.  For that, the `D`
directive is required instead.  As a result, if one does not have `/tmp`
as a tmpfs, `/tmp/user` is never cleaned and temporary files accumulate.

I noticed this because I've disabled using `/tmp` as a tmpfs, since I
use it frequently for temporary storage and only rarely reboot, so with
a tmpfs I run out of space.  As a consequence, `/tmp/user` had not been
cleaned since late December and, after providing a corrected tmpfiles.d
file and rebooting, my system took 4 minutes and 4 seconds just to clean
up temporary files, even with a high-speed NVMe drive.

Could you adjust this file in the next version to use the `D` directive
so this is automatically cleaned on boot?  That would preserve the
traditional behaviour in Debian that temporary files are cleared on
boot.

#1106878#10
Date:
2025-06-12 04:18:30 UTC
From:
To:
]] "brian m. carlson"

Good catch, thanks.  Will be in the next upload.