because parent directory has insecure permissions

centos7

[code lang=text] From root@localhost.localdomain Wed Oct 19 04:20:36 2016 Return-Path: <root@localhost.localdomain> X-Original-To: root Delivered-To: root@localhost.localdomain Received: by localhost.localdomain (Postfix, from userid 0) id 1FDA8F6DB5; Wed, 19 Oct 2016 04:20:36 +0900 (JST) From: Anacron <root@localhost.localdomain> To: root@localhost.localdomain Content-Type: text/plain; charset="UTF-8" Subject: Anacron job 'cron.daily' on localhost.localdomain Message-Id: <20161018192036.1FDA8F6DB5@localhost.localdomain> Date: Wed, 19 Oct 2016 04:20:36 +0900 (JST)

/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. 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. [/code]

logrotate動いたけど 権限が違うからなにやら su をセットしろ みたいなことを言われている

[code lang=text] [root@localhost hdd1]# cat /etc/logrotate.d/php-fpm /var/log/php-fpm/*log { su nginx nginx missingok notifempty sharedscripts delaycompress postrotate /bin/kill -SIGUSR1 cat /run/php-fpm/php-fpm.pid 2&gt;/dev/null 2>/dev/null || true endscript } [/code]

追記してみた 調べてみたらこれでいいらしい また明日でていたら対応する