[arch-general] tmp files no longer removed

Lukáš Jirkovský l.jirkovsky at gmail.com
Wed Jun 20 12:32:36 EDT 2012


On 20 June 2012 18:28, Tom Gundersen <teg at jklm.no> wrote:
> On Jun 20, 2012 6:05 PM, "Lukáš Jirkovský" <l.jirkovsky at gmail.com> wrote:
>>
>> Hello,
>> before submitting bug report I want to make sure this isn't feature.
>> My problem is that my /tmp folder is no longer cleaned up during boot.
>> Now I have to do that manually which is really annoying.
>>
>> I dug through the git of initscripts and it seems to be caused by the
>> replacement of the original code by the systemd-tmpfiles tool. I've
>> just tried to run systemd-tmpfiles manually and it seems that it is
>> not able to do even a simple task such as rm -rf /tmp/*.
>
> There was a slight change in behavior. Earlier we would delete all files at
> boot, now we (or rather systemd-tmpfiles on our behalf) delete all 'old
> files'. That is, all files that have not been accessed within the last then
> days.
>
> This behavior is configured in /usr/lib/tmpfiles.d/tmp.conf. To change the
> behavior, copy the file to /etc/tmpfiles.d/ and edit it there. You can
> easily configure it to get the old behavior back.
>
> Alternatively, you could put /tmp on a tmpfs, to throw away all contents on
> reboot; or create a cron job that calls systemd-tmpfiles regularly (say
> once a day) to also delete old files at runtime, rather than only at boot.
>
> Check 'man tmpfiles.d' for more details.
>
> Cheers,
>
> Tom

Already did that. I changed the config to:
d /tmp 1777 root root 0d
d /var/tmp 1777 root root 0d

but it doesn't clean anything.


More information about the arch-general mailing list