Re: tmp files no longer removed

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



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


[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