Bug 2157081 - logrotate fails due to folder permissions on /var/log/akmods
Summary: logrotate fails due to folder permissions on /var/log/akmods
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: akmods
Version: epel9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Basto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-30 14:48 UTC by Andrew Bauer
Modified: 2023-01-19 10:00 UTC (History)
8 users (show)

Fixed In Version: akmods-0.5.7-8.el9
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-19 10:00:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew Bauer 2022-12-30 14:48:29 UTC
Description of problem:
The logrotate service fails with the following error, when it tries to process the /var/log/akmods folder:

> logrotate[3477]: error: skipping "/var/log/akmods/akmods.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
>systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
>systemd[1]: logrotate.service: Failed with result 'exit-code'.
>systemd[1]: Failed to start Rotate log files.

Version-Release number of selected component (if applicable):
akmods-0.5.7-7.el9.noarch

How reproducible:
Install akmods on an el9 system then let logrotate run

Steps to Reproduce:
1. dnf install akmods or a package that requires akmods
2. run logrotate

Actual results:
Logrotate fails with the error message specified above

Expected results:
Logroate runs successfully w/o an error

Additional info:
This can be resolved by adding "su akmods akmods" to /etc/logrotate.d/akmods.conf like so:

>/var/log/akmods/akmods.log {
>    su akmods akmods
>    monthly
>    rotate 12
>    missingok
>    notifempty
>    create 644 root root
>}

Comment 1 Fedora Update System 2023-01-10 01:27:02 UTC
FEDORA-EPEL-2023-9c21fc6233 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-9c21fc6233

Comment 2 Fedora Update System 2023-01-11 01:49:55 UTC
FEDORA-EPEL-2023-9c21fc6233 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-9c21fc6233

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2023-01-19 10:00:54 UTC
FEDORA-EPEL-2023-9c21fc6233 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.


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