Am 03.04.21 um 18:02 schrieb Peter McD:
So I move from /usr/lib/tmpfiles.d/fs-var-tmp.conf to /etc/tmpfiles.s/
and modify # d /var/tmp 1777 root root - to d /var/tmp 1777 root root 1d
I expect after a reboot older folders/files. e.g. drwx------ 3 root root 4096 3. Apr 17:40 systemd-private-6704694542b3421f8612991315fd7962-chronyd.service-RNsuvq
But several reboots later there are only the folders/files with the same /date/time of the latest boot time.
e.g. drwx------ 3 root root 4096 3. Apr 17:56 systemd-private-6d19ab9a0f284936a9177444417f38b8-chronyd.service-33ZqOB
What is wrong?
I didn't find anything in the documentation but according to https://unix.stackexchange.com/questions/219814/why-is-systemd-tmpfiles-clea... systemd also seems to take the access (atime) and inode change timestamp (ctime) into account - and not only the modification timestamp (mtime). That means, if you look at a file (to check whether it's still there) you might also change the atime or ctime of the directory. To understand what's going on, try this: SYSTEMD_LOG_LEVEL=debug /usr/bin/systemd-tmpfiles --clean One thing you could try is (from 'man tmpfiles.d'): --- snip --- When the age is set to zero, the files are cleaned unconditionally. --- snap --- HTH -- Till -- Dipl.-Inform. Till Dörges doerges@pre-sense.de PRESENSE Technologies GmbH Nagelsweg 41, D-20097 HH Geschäftsführer/Managing Directors AG Hamburg, HRB 107844 Till Dörges, Jürgen Sander USt-IdNr.: DE263765024