Bug 2221442 - rsyslogd logs an error that is seemingly unfixable
Summary: rsyslogd logs an error that is seemingly unfixable
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: rsyslog
Version: 38
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Attila Lakatos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-09 03:44 UTC by John Dodson
Modified: 2023-07-14 06:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Dodson 2023-07-09 03:44:59 UTC
rsyslogd logs an error that is seemingly unfixable.

rsyslogd[452925]: imjournal: filecreatemode is not set, using default 0644 [v8.2306.0-1.fc38 try https://www.rsyslog.com/e/2186 ]

See also: under RedHat Customer portal...
Imjournal module ignores $FileCreateMode parameter

even though it says " Solution Verified - Updated June 12 2023 at 10:43 AM" I can't see that.
Red Hat Bugzilla – Bug 2181560
&
Red Hat Bugzilla – Bug 2181559



Reproducible: Always

Steps to Reproduce:
1. restart rsyslog
2. No messing with /etc/rsyslog.conf 
or /usr/lib/systemd/system/rsyslog.service
permissions seems to remove the error.
3.
Actual Results:  
imjournal: filecreatemode is not set, using default 0644 [v8.2306.0-1.fc38 try https://www.rsyslog.com/e/2186 ]

Expected Results:  
No error
Or
Ability to silence the error or set appropriate permissions.

Comment 1 Attila Lakatos 2023-07-10 07:00:54 UTC
To silence the error, you can set the filecreatemode module parameter for the imjournal module.

Comment 2 John Dodson 2023-07-11 01:13:49 UTC
Where & how - I've tried many permutations in many places.
Can that not be a default in the distributed config file?
(Wherever that might be?)

Comment 3 Attila Lakatos 2023-07-11 06:34:10 UTC
Just change
module(load="imjournal" StateFile="imjournal.state")
To
module(load="imjournal" StateFile="imjournal.state" filecreatemode="some file mode that is suitable for you, e.g. 0600 but don't forget to set the appropriate permission for the file as well if you've already created it")

Comment 4 John Dodson 2023-07-14 02:13:07 UTC
OK.
Can whatever the current default is (or better 0640) be placed in the
rsyslog.conf file in the future?

It seems unreasonable to leave such an error as the default.

Comment 5 Attila Lakatos 2023-07-14 06:55:32 UTC
See https://github.com/rsyslog/rsyslog/pull/5109 for detailed discussion and what is recommended.


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