I have noticed that tmpwatch isn't automatically installed with Centos 7, or at least it wasn't when I set up this computer.
I further noticed that the Centos 7 tmpwatch rpm no longer includes /etc/cron.daily/tmpwatch
I suspect that at least part of the reason for this is because the /tmp directory is now mounted as a tmpfs by default, so it's automatically cleared when the machine is rebooted.
However, this does nothing to maintain /var/tmp and /var/cache
Installing the Centos 7 tmpwatch rpm and copying the /etc/cron.daily/tmpwatch file from a Centos 6 installation onto a Centos 7 machine might not be particularly wise because the excluded directories listed in the Centos 6 tmpwatch script don't include such things as the systemd-private* directories that should probably not be made to disappear on a Centos 7 installation.
This leads to two questions: Is tmpwatch even required on Centos 7 anymore, or has it been superseded somehow? And if it is required (or a good idea), is there an updated script to put into /etc/cron.daily that accounts for directories and files that should not be molested by tmpwatch?
On Sat, Oct 18, 2014 at 03:04:36PM -0600, Frank Cox wrote:
I have noticed that tmpwatch isn't automatically installed with Centos 7, or at least it wasn't when I set up this computer.
I further noticed that the Centos 7 tmpwatch rpm no longer includes /etc/cron.daily/tmpwatch
There's no need for the tmpwatch cron job because systemd-tmpfiles does its job. Read the 'tmpfiles.d' man page. Configuration for the temp directories is in /usr/lib/tmpfiles.d/tmp.conf, and you can add your own files in /etc/tmpfiles.d/*.conf.
On Sat, 18 Oct 2014 17:23:29 -0400 Jonathan Billings wrote:
On Sat, Oct 18, 2014 at 03:04:36PM -0600, Frank Cox wrote:
I have noticed that tmpwatch isn't automatically installed with Centos 7, or at least it wasn't when I set up this computer.
I further noticed that the Centos 7 tmpwatch rpm no longer includes /etc/cron.daily/tmpwatch
There's no need for the tmpwatch cron job because systemd-tmpfiles does its job. Read the 'tmpfiles.d' man page. Configuration for the temp directories is in /usr/lib/tmpfiles.d/tmp.conf, and you can add your own files in /etc/tmpfiles.d/*.conf.
Today I have learned something new; many thanks to you.