Topic: logrotate issues on Centos 7

Good day.
We have faced with issue on Centos 7 for php-fpm.d:
For example:

/etc/cron.daily/logrotate:

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

Rights is: drwxrwx---   2 root apache  4096 Mar 19 07:58 .
As I see, on Centos 5 the rights is the same, but no error on logrotate.
Can you comment on it? Thank you.

Re: logrotate issues on Centos 7

Never saw this message.

Any recent update of logrotate ?

Will try to reproduce.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: logrotate issues on Centos 7

I cannot reproduce, but it seems the right on the directory is not the one defined in the RPM:

# ls -ald /var/log/php-fpm/
drwxrwx---. 2 apache root 22 14 mai   08:25 /var/log/php-fpm/
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: logrotate issues on Centos 7

Yes, thank you.
We have magade it by puppet and changed owner root:apache instead apache:root.
if you turn it back - logrotate works fine.

Re: logrotate issues on Centos 7

Solved smile

So closing this one.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi