Description of problem: logrotate doesn't rotate php-fpm log after clear install of f16 Version-Release number of selected component (if applicable): # rpm -q php-fpm php-fpm-5.3.8-3.fc16.x86_64 How reproducible: - default configuration of logrotate, iow nothing has been touched. # logrotate -d /etc/logrotate.conf /etc/logrotate.d/php-fpm Actual results: rotating pattern: /var/log/php-fpm/*log weekly (4 rotations) empty log files are not rotated, old logs are removed considering log /var/log/php-fpm/error.log 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. considering log /var/log/php-fpm/www-error.log error: skipping "/var/log/php-fpm/www-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. not running postrotate script, since no logs were rotated Expected results: rotating pattern: /var/log/php-fpm/*log weekly (4 rotations) empty log files are not rotated, old logs are removed considering log /var/log/php-fpm/error.log log needs rotating considering log /var/log/php-fpm/www-error.log log needs rotating rotating log /var/log/php-fpm/error.log, log->rotateCount is 4 dateext suffix '-20120110' glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' glob finding old rotated logs failed rotating log /var/log/php-fpm/www-error.log, log->rotateCount is 4 dateext suffix '-20120110' glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' glob finding old rotated logs failed fscreate context set to system_u:object_r:var_log_t:s0 renaming /var/log/php-fpm/error.log to /var/log/php-fpm/error.log-20120110 creating new /var/log/php-fpm/error.log mode = 0600 uid = 0 gid = 0 fscreate context set to system_u:object_r:var_log_t:s0 renaming /var/log/php-fpm/www-error.log to /var/log/php-fpm/www-error.log-20120110 creating new /var/log/php-fpm/www-error.log mode = 0644 uid = 48 gid = 48 running postrotate script running script with arg /var/log/php-fpm/*log : " /bin/kill -SIGUSR1 `cat /var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true "
Fix for this is to add 'su' directive to the php-fpm config of logrotate.d i.e. /var/log/php-fpm/*log { su missingok notifempty sharedscripts delaycompress postrotate /bin/kill -SIGUSR1 `cat /var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true endscript } but I don't know whether this is the way to go...
Anton, This looks like it's assigned to the wrong component. (it's currently assigned to php-fpdf - which has nothing to do with what php-fpm does. Reassigning to php
I will change owner to root on next update (php 5.3.9)
php-5.3.9-1.fc16,maniadrive-1.2-32.fc16.1,php-eaccelerator-0.9.6.1-9.fc16.1 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/php-5.3.9-1.fc16,maniadrive-1.2-32.fc16.1,php-eaccelerator-0.9.6.1-9.fc16.1
Package php-5.3.9-1.fc16, maniadrive-1.2-32.fc16.1, php-eaccelerator-0.9.6.1-9.fc16.1: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing php-5.3.9-1.fc16 maniadrive-1.2-32.fc16.1 php-eaccelerator-0.9.6.1-9.fc16.1' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-0504/php-5.3.9-1.fc16,maniadrive-1.2-32.fc16.1,php-eaccelerator-0.9.6.1-9.fc16.1 then log in and leave karma (feedback).
php-5.3.9-1.fc16, maniadrive-1.2-32.fc16.1, php-eaccelerator-0.9.6.1-9.fc16.1 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.