Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-119492

omfile "FileCreateMode" and such are not having any effect

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • No
    • Low
    • rhel-security-special-projects
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      We always tell the customers to not use legacy directives anymore.
      But it appears this is not always feasible because of bugs in the new directives.
      See for example:

      Works

      $FileOwner syslog
      $FileGroup adm
      $FileCreateMode 0600
      

      Doesn't work (files owned by root anyway)

      module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat"
             fileCreateMode="0600" fileOwner="syslog" fileGroup="adm")
      

      What is the impact of this issue to you?

      Issue with what we tell the customers.

      Please provide the package NVR for which the bug is seen:

      rsyslog-8.2412.0-1.el9

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Create "syslog:adm" user/group
        # useradd -N -M -r -g adm syslog
      1. Configure rsyslog to create files as this user, in /etc/rsyslog.conf
        module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat"
               fileCreateMode="0600" fileOwner="syslog" fileGroup="adm")
      1. Delete /var/log/messages and restart rsyslog
        # systemctl stop rsyslog
        # rm /var/log/messages
        # systemctl start rsyslog
        # ls -l /var/log/messages
        

      Expected results

      -rw-------. 1 syslog adm 816 Oct  6 15:02 /var/log/messages

      Actual results

      -rw-------. 1 root root 1178 Oct  6 15:01 /var/log/messages

       

              rh-ee-alakatos Attila Lakatos
              rhn-support-rmetrich Renaud Métrich
              Attila Lakatos Attila Lakatos
              SSG Security QE SSG Security QE
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: