Re: tmp files no longer removed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 20 June 2012 18:32, Lukáš Jirkovský <l.jirkovsky@xxxxxxxxx> wrote:
> On 20 June 2012 18:28, Tom Gundersen <teg@xxxxxxx> wrote:
>> On Jun 20, 2012 6:05 PM, "Lukáš Jirkovský" <l.jirkovsky@xxxxxxxxx> 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.

I finally achieved the desired result by using
R /tmp/*
d /tmp 1777 root root 0d
d /var/tmp 1777 root root 0d

However the cleanup functionality seems to be broken – even if I
selected 0d, 1s or any similar short interval, the systemd-tmpfiles
didn't clean the /tmp. And even it did nothing, it still took about a
second to finish.

Lukas


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux