Bug 2157081

Summary: logrotate fails due to folder permissions on /var/log/akmods
Product: [Fedora] Fedora EPEL Reporter: Andrew Bauer <zonexpertconsulting>
Component: akmodsAssignee: Sergio Basto <sergio>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel9CC: hdegoede, hobbes1069, kwizart, leigh123linux, negativo17, nicolas.vieville, sergio, travier
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: akmods-0.5.7-8.el9 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-19 10:00:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.