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.
Bug 1411199 - systemd-tmpfiles will not update existing journal files
Summary: systemd-tmpfiles will not update existing journal files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Synacek
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
: 1446991 (view as bug list)
Depends On:
Blocks: 74systemd
TreeView+ depends on / blocked
 
Reported: 2017-01-09 04:54 UTC by Alois Mahdal
Modified: 2017-08-01 09:14 UTC (History)
7 users (show)

Fixed In Version: systemd-219-40.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:14:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch (2.04 KB, patch)
2017-03-07 13:36 UTC, Jan Synacek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2297 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2017-08-01 12:40:16 UTC

Description Alois Mahdal 2017-01-09 04:54:32 UTC
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

Comment 2 Alois Mahdal 2017-02-21 18:31:08 UTC
Note that alternative way to test this is to remove workaround from:

    /CoreOS/systemd/Sanity/journalctl-permissions

and re-run it against new build.

Comment 3 Jan Synacek 2017-03-07 13:36:09 UTC
Created attachment 1260800 [details]
patch

Since the patched file is not in the repo, I cannot submit a PR for this.

Comment 4 Jan Synacek 2017-05-09 10:12:36 UTC
Meanwhile, the file has gotten into the repo, I can file a proper PR now.

https://github.com/lnykryn/systemd-rhel/pull/120

Comment 5 Jan Synacek 2017-05-09 10:13:21 UTC
(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...

Comment 6 Jan Synacek 2017-05-15 12:00:09 UTC
*** Bug 1446991 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2017-08-01 09:14:52 UTC
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


Note You need to log in before you can comment on or make changes to this bug.