[systemd-devel] systemd-tmpfiles for the user instance of systemd
Lennart Poettering
lennart at poettering.net
Mon Jul 27 18:31:08 PDT 2015
On Sat, 04.07.15 13:23, Tomasz Torcz (tomek at pipebreaker.pl) wrote:
> On Fri, Jul 03, 2015 at 08:31:42PM +0200, Lennart Poettering wrote:
> > On Wed, 01.07.15 12:35, Daniel Tihelka (dtihelka at gmail.com) wrote:
> >
> > > Hello,
> > > does anyone have an experience with the use of systemd-tmpfiles for the user
> > > instance of systemd.
> >
> > This is currently not nicely supported. And I am not sure it
> > should. Note that much of what tmpfiles supports is only necessary
> > for:
> >
> > - aging (automatic time-based clean-up of files). Doesn't really apply
> > to user sessions, since /tmp and /var/tmp are already cleaned up by
> > the system instance of tmpfiles
>
> /var and /tmp are not only aged files. I'm using tmpfiles for removing
> – files in ~/Downloads/* older than 1 year
> – emails in ~/Mail/.spam/cur/* older than 1 month
>
> Out of neccessity I have cleanup configured in system instance for my
> specific user only.
My recommendation would be to clean ~/Downloads up from the root
tmpfiles instances.
The simple issue is that aging for dirs cannot work, since iterating
through them will bump the atime, which defeats the aging. You hence
break the aging by aging... THis can only work if you have root privs,
since then we can turn off the atime bumping...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list