Bug 2099670 - [cee/sd][Cephadm] error: skipping "/var/log/ceph/cephadm.log" because parent directory has insecure permissions. Set "su" directive in config file to tell logrotate which user/group should be uer/group should be used for rotation.
Summary: [cee/sd][Cephadm] error: skipping "/var/log/ceph/cephadm.log" because parent ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Cephadm
Version: 5.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
: 6.0
Assignee: Adam King
QA Contact: Rajendra Khambadkar
Eliska
URL:
Whiteboard:
: 2099669 (view as bug list)
Depends On:
Blocks: 2126050
TreeView+ depends on / blocked
 
Reported: 2022-06-21 13:10 UTC by Milind
Modified: 2023-03-20 18:57 UTC (History)
14 users (show)

Fixed In Version: ceph-17.2.3-12.el9cp
Doc Type: Bug Fix
Doc Text:
.Log rotation of the `cephadm.log` should no longer cause issues Previously, the `logrotate` command would cause issues if `/var/log/ceph` directory was created by something other than `cephadm`, for example `ceph-common` or `ceph-ansible`. As a consequence, the `cephadm.log` could not be rotated. With this fix, `su root root` was added to the logrotate configuration to rotate as a `root` user. The `logrotate` command no longer causes an issue with the ownership of `var/log/ceph` directory, therefore the `cephadm.log` is rotated as expected.
Clone Of:
Environment:
Last Closed: 2023-03-20 18:56:39 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-4593 0 None None None 2022-06-21 13:17:28 UTC
Red Hat Knowledge Base (Solution) 6967157 0 None None None 2022-07-11 23:00:11 UTC
Red Hat Product Errata RHBA-2023:1360 0 None None None 2023-03-20 18:57:05 UTC

Description Milind 2022-06-21 13:10:08 UTC
Description of problem:
/etc/cron.daily/logrotate:

error: skipping "/var/log/ceph/cephadm.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.


Version-Release number of selected component (if applicable):
ceph version 16.2.0-152.el8cp

How reproducible:
Always

Steps to Reproduce:
1. see the /etc/logrotate.d/cephadm 
2. try to rotate the logs using command"logrotate /etc/logrotate.d/cephadm"
3. my /etc/logrotate.d/cephadm 

# cat /etc/logrotate.d/cephadm
==================================
# created by cephadm
/var/log/ceph/cephadm.log {
    rotate 7
    daily
    compress
    missingok
    notifempty
}
==================================

Actual results:
error: skipping "/var/log/ceph/cephadm.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.


Expected results:
logs should be rotated

Additional info:

Comment 20 Adam King 2022-09-27 12:43:56 UTC
*** Bug 2099669 has been marked as a duplicate of this bug. ***

Comment 29 errata-xmlrpc 2023-03-20 18:56:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 6.0 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:1360


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