Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem
======================
systemd-tmpfiles will not set up persistent journal storage properly.
If storage already contains files, their ACL/ownership will not be
changed.
Version-Release number of selected component
============================================
systemd-219-30.el7
How reproducible
================
Always
Steps to Reproduce
==================
1. rm -rf /var/log/journal
2. systemctl restart systemd-journald.service
This already generates /var/log/journal/<ID>/system.journal
3. systemd-tmpfiles --create --prefix /var/log/journal
4. observe system.journal
Actual results
==============
Group is root.
Expected results
================
Group should be systemd-journal, i.e. member of this group should be
able to read this file.
Additional info
===============
This does not appear in case of volatile storage; in that case /run/log
seems to be updated correctly. Also it does not happen on Fedora 24,
so this could have already been fixed (intentionally or not).
Following is diff of /usr/lib/tmpfiles.d/systemd.conf from RHEL7 and
Fedora 24 (229-16.fc24):
--- systemd-rhel7.conf 2017-01-09 05:25:23.640695553 +0100
+++ systemd.conf 2017-01-09 05:25:00.682352824 +0100
@@ -30,9 +30,13 @@
z /var/log/journal 2755 root systemd-journal - -
z /var/log/journal/%m 2755 root systemd-journal - -
+z /var/log/journal/%m/system.journal 0640 root systemd-journal - -
+a+ /var/log/journal - - - - d:group:adm:r-x,d:group:wheel:r-x
+a+ /var/log/journal - - - - group:adm:r-x,group:wheel:r-x
a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x
-A+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x
+a+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x
+a+ /var/log/journal/%m/system.journal - - - - group:adm:r--,group:wheel:r--
d /var/lib/systemd 0755 root root -
d /var/lib/systemd/coredump 0755 root root 3d
(In reply to Jan Synacek from comment #4)
> Meanwhile, the file has gotten into the repo, I can file a proper PR now.
I mean, I can now properly patch the .m4 file that generates the tmpfiles snippet...
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2017:2297
Description of problem ====================== systemd-tmpfiles will not set up persistent journal storage properly. If storage already contains files, their ACL/ownership will not be changed. Version-Release number of selected component ============================================ systemd-219-30.el7 How reproducible ================ Always Steps to Reproduce ================== 1. rm -rf /var/log/journal 2. systemctl restart systemd-journald.service This already generates /var/log/journal/<ID>/system.journal 3. systemd-tmpfiles --create --prefix /var/log/journal 4. observe system.journal Actual results ============== Group is root. Expected results ================ Group should be systemd-journal, i.e. member of this group should be able to read this file. Additional info =============== This does not appear in case of volatile storage; in that case /run/log seems to be updated correctly. Also it does not happen on Fedora 24, so this could have already been fixed (intentionally or not). Following is diff of /usr/lib/tmpfiles.d/systemd.conf from RHEL7 and Fedora 24 (229-16.fc24): --- systemd-rhel7.conf 2017-01-09 05:25:23.640695553 +0100 +++ systemd.conf 2017-01-09 05:25:00.682352824 +0100 @@ -30,9 +30,13 @@ z /var/log/journal 2755 root systemd-journal - - z /var/log/journal/%m 2755 root systemd-journal - - +z /var/log/journal/%m/system.journal 0640 root systemd-journal - - +a+ /var/log/journal - - - - d:group:adm:r-x,d:group:wheel:r-x +a+ /var/log/journal - - - - group:adm:r-x,group:wheel:r-x a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x -A+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x +a+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x +a+ /var/log/journal/%m/system.journal - - - - group:adm:r--,group:wheel:r-- d /var/lib/systemd 0755 root root - d /var/lib/systemd/coredump 0755 root root 3d