-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: set ownership of syslog created log file to frr #4379
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Problem reported with errors if "log file /var/log/frr/frr.log" is entered and the file had been created by syslog with root ownership. This fix sets the ownership to frr/frrvty so that the file can be referenced and defined within frr if syslog created it. Signed-off-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-18981
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
# The lines below cause all FRR daemons and process to go | ||
# to /var/log/frr/frr.log, then drops the message so it does | ||
# not also go to /var/log/syslog, so the messages are not duplicated | ||
# Set file ownership of the frr.log file so frr can reference it from | ||
# CLI. Without this, log file is created with root ownership which can | ||
# cause issues. | ||
|
||
$FileOwner frr | ||
$FileGroup frrvty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In addition to the intrusion problem described in my conversation comment, I'm not convinced So either this is accompanied by a permission setting to 0640, or the group setting is underdetermined in its effect and needs to go. |
||
|
||
$outchannel frr_log,/var/log/frr/frr.log | ||
if $programname == 'babeld' or | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so I just looked at the rsyslogd docs and these are global configuration parameters, which affect all following statements (the doc for
$FileOwner
and$FileGroup
doesn't say specifically, but$FileCreateMode
does and I think it's reasonable to assume these 3 work the same way.)That would mean that the effect of these statements is not limited to
45-frr.conf
(or thefrr.log
file created) but rather extends to any other logging config loaded after it, e.g.50-foobar.conf
.I'm only 60% confident on this (I use
syslog-ng
personally), but this definitely needs to be confirmed or invalidated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. I'll check into whether this is true or not and find alternatives.