To check errors in logrotate, run the logrotate cron script as follows:
$ sudo /etc/cron.daily/logrotate
error: skipping "/home/izeye/programs/nginx/logs/access.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 "/home/izeye/programs/nginx/logs/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.
$
If you encounter the above errors, you can change the owner and the group of the `logs` directory to the `root` in this case as follows:
sudo chown -R root:root logs
I can't see any security effect with this but I'm not sure because I'm not an expert on security.
Reference:
http://serverfault.com/questions/381081/where-does-logrotate-save-their-own-log
No comments:
Post a Comment