Re: Question on $FileCreateMode for imjournal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark C. Allman via users wrote:
> I'm seeing this line in /var/log/messages:
> 
> imjournal: filecreatemode is not set, using default 0644 [v8.2312.0-1.fc40
> try https://www.rsyslog.com/e/2186 ]
> 
> From the page
> https://www.rsyslog.com/doc/configuration/action/rsconf1_filecreatemode.html,
> I see that I need to set $FileCreateMode. OK. Where?

That is for Legacy Configuration Directives.  You're best to
avoid those anytime you can. (But to be fair, I do think the
rsyslog docs are generally a bit of a pain to use.)

>  * I created a conf file in /etc/rsyslog.d/ with "$FileCreateMode 0600." No
> impact.
>  * I edited (temporarily) /etc/rsyslog.conf and inserted the above line both
> before, after and (as a last resort) both before and after the imjournal
> module load. No impact.

That variable doesn't apply to the imjournal plugin (as far
as I know).  Additionally, setting a var in /etc/rsyslog.d/
likely will not apply to all the previous configuration
before it (with plenty of caveats depending on the setting,
of course).

There's an old RHEL bug regarding this and it was fixed in
CentOS Stream 9 not too long ago.

    https://bugzilla.redhat.com/2181552
    https://issues.redhat.com/browse/RHEL-949
    https://gitlab.com/redhat/centos-stream/rpms/rsyslog/-/commit/129bf49

> Where should this variable be set and what's the correct syntax? I also sent
> this to the rsyslog list but I thought I'd throw it out here as well.

It's best to not post to multiple lists simultaneously, IMO.
You then have to decide which information is the best if you
get replies from both lists.  A reply here _may_ be better
as a Fedora-specific solution while a reply from the rsyslog
list _may_ be better as applied to the stock rsyslog. :)

That said, adding FileCreateMode="0644" to the imjournal
parameters should resolve this harmless log entry, e.g.:

    diff --git i/rsyslog.conf w/rsyslog.conf
    index f6d3f6a..1396c37 100644
    --- i/rsyslog.conf
    +++ w/rsyslog.conf
    @@ -18,6 +18,7 @@ module(load="imuxsock"    # provides support for local system logging (e.g. via
	    SysSock.Use="off") # Turn off message reception via local log socket; 
			       # local messages are retrieved through imjournal now.
     module(load="imjournal"             # provides access to the systemd journal
    +       FileCreateMode="0644"        # Set access permissions for the state file
	    StateFile="imjournal.state") # File to store the position in the journal
     
     # Include all config files in /etc/rsyslog.d/

This change was made in CentOS Stream and RHEL but has not
be pushed to Fedora, unfortunately.  It would be ideal if
RHEL followed the "upstream first" mantra.

-- 
Todd

Attachment: signature.asc
Description: PGP signature

--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux