Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #170492
| From | Josh Triplett <josh@joshtriplett.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: How to prevent /tmp files from being deleted at reboot |
| Date | 2016-07-28 09:10 +0200 |
| Message-ID | <rZNCa-2Rd-33@gated-at.bofh.it> (permalink) |
| References | <rU7WW-6Ps-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Michael Biebl wrote: > Now to your issue. You said you wanted time based clean-up (remove files > older then 30 days) but *not* remove them on boot. > > You've created a file /etc/tmpfiles.d/tmp.conf which overrides the > default that is shipped in /usr/lib/tmpfiles.d/tmp.conf > So far so good. What you used in /etc/tmpfiles.d/tmp.conf is: > > D /tmp 1777 root root 30d > > Let's see the tmpfiles.d man page [1]: > > > D > > Similar to d, but in addition the contents of the directory will be > > removed when --remove is used. > > During boot systemd-tmpfiles-setup.service is run: > > $ systemctl cat systemd-tmpfiles-setup.service | grep ExecStart > ExecStart=/bin/systemd-tmpfiles --create --remove --boot > --exclude-prefix=/dev > > So, you actually requested that /tmp is cleaned up during boot. What you > want is the 'd' option. Again, have a look at the tmpfiles.d man page [2]: > > > d > > Create a directory. The mode and ownership will be adjusted if specified and the directory already exists. Contents of this directory are subject to time based cleanup if the time > > argument is specified. > > > So, what you copied from the bug report was simply not what you were > looking at. Always consult the man pages. The ones shipped by systemd > are actually pretty decent. My first mail to that bug report, at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795269#10 , had a bug in the patch: it migrates the TMPTIME setting to the appropriate line, but it doesn't change 'D' to 'd', so /tmp still gets wiped on boot. I sent an updated patch to the bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795269#22 Please consider applying that updated patch to the systemd postinst. - Josh Triplett
Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread
How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-09 17:20 +0200
Re: How to prevent /tmp files from being deleted at reboot Sven Hartge <sven@svenhartge.de> - 2016-07-09 19:40 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-09 23:20 +0200
Re: How to prevent /tmp files from being deleted at reboot Linux-Fan <Ma_Sys.ma@web.de> - 2016-07-10 15:40 +0200
Re: How to prevent /tmp files from being deleted at reboot Wilko Fokken <wfokken@web.de> - 2016-08-07 21:00 +0200
Re: How to prevent /tmp files from being deleted at reboot Jörg-Volker Peetz <jvpeetz@web.de> - 2016-07-10 17:20 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-10 23:10 +0200
Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-11 16:00 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-11 17:50 +0200
Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-11 18:10 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 15:00 +0200
Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-16 15:10 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 15:30 +0200
Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-16 17:10 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 17:30 +0200
How to prevent /tmp files from being deleted at reboot Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> - 2016-08-05 09:30 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-08-05 21:40 +0200
Re: Re: How to prevent /tmp files from being deleted at reboot Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> - 2016-08-06 16:10 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 15:30 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-11 12:40 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-11 15:30 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-12 17:40 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-12 17:40 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 16:10 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 16:20 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 16:30 +0200
Re: How to prevent /tmp files from being deleted at reboot Mark Fletcher <mark27q1@gmail.com> - 2016-07-16 16:40 +0200
Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 16:50 +0200
Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 17:20 +0200
How to prevent /tmp files from being deleted at reboot Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> - 2016-08-05 09:30 +0200
Re: How to prevent /tmp files from being deleted at reboot Josh Triplett <josh@joshtriplett.org> - 2016-07-28 09:10 +0200
csiph-web