Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-2888

RH124-421: Using systemd-tmpfile to modify permissions on /var/log/journal

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Won't Do
    • Icon: Major Major
    • RH124 - RHEL 8 1 20190507
    • RH124 - RHEL 7 1 20150420
    • RH124
    • None
    • This affects the RH124, RH199, RH254, RH299, rh 342, and RH413, as far as i know.

    • ILT, ROLE, VT
    • en-US (English)

      URL:
      Reporter RHNID:
      Section: -
      Language: en-US (English)|
      Workaround:

      Description: We have long been teaching students that in order to create a persistant log of journald, we need to follow these steps:

      mkdir /var/log/journal
      chown root:systemd-journal /var/log/journal
      chmod 2755 /var/log/journal
      systemctl restart system-journald

      I propose we change this to the following:

      mkdir /var/log/journal
      systemd-tmpfiles --create --prefix /var/log/journal
      systemctl restart system-journald

      This is for a number of reasons:
      1: the only time a user will ever need to know the group "systemd-journal" is for this command alone. This is not something a user should need to memorize
      2: having a user manually set the user:group, as well as permissions and special bit is not really value add work, there are many places to set permissions.
      3: The proper, official way to do this since the changes to systemd version 208, is to use tmpfiles, since it properly does it in one shot, one less command.
      4: This change would better explain how tmpfiles works, by teaching them how --create works, and showing them the /usr/lib/tmpfiles.d/systemd.conf file. Tons of examples there for them to learn from

            rht-sbonnevi Steven Bonneville
            nitedoggy Randy Hamilton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: