Systemd tempfiles and locks, should the RPM not include a tmpfiles.d config?

OS: CentOS Linux release 7.9.2009 (Core)
cmk: check-mk-raw-2.0.0p1 (upgraded from 1.x)

When mkbackup backup backup-daily >/dev/null runs via cron, it attempts to create /var/lock/mkbackup. Since CentOS 7 uses systemd and has a symlink /var/lock -> ../run/lock, I was kind of expecting a tmpfiles.d(5) config to be created at /usr/lib/tmpfiles.d/omd.conf when I install the RPM. Is this expectation wrong?

For now I created my own /etc/tmpfiles.d/omd.conf containing
# see also https://developers.redhat.com/blog/2016/09/20/managing-temporary-files-with-systemd-tmpfiles-on-rhel7/
#Type Path Mode UID GID
d /run/lock/mkbackup 0770 root omd

followed once by a systemd-tmpfiles --create (one could also simply reboot, but meh reboots)

While this works as expected, IMHO it would be nicer if installing CheckMK took care of this.

pcfe

See Backups don't work with 2.x and Site backup failed: Failed to perform backup: [Errno 104] Connection reset by peer. Maybe leave a comment there, as the tribe is already involved in the later thread.

Generally I think we all agree, that this should be delivered by Checkmk on installation and as this really got attention I think they implement that soon, unless there are good reasons not to.

Wouldn’t 775 be better than 770 in this specific case for permissions? I noticed that the other directories permissions default to 755, the way this is designed (on CentOS) I think it’s meant for others to have read access. Here we want the group to have write access since multiple sites can have backups so 775 instead of 755.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.