syslog errors and apache2

syslog errors and apache2

这是这个问题...

So I can change the ownership of the log file, and the errors stop. I changed the ownership from root:adm to syslog:adm and the errors cease. But when the logs get rotated, the NEW log is created with root:adm ownership, and the flood of errors reappears. I would like to a) understand how this works and b) fix the errors so they do not reoccur.

Is there a config file somewhere which sets the ownership of the apache log files so this can be fixed permanently?

Edited To Add:

meuh is correct. Found /etc/logrotate.d/apache2:

/var/log/apache2/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
            if invoke-rc.d apache2 status > /dev/null 2>&1; then \
                invoke-rc.d apache2 reload > /dev/null 2>&1; \
            fi;
endscript
prerotate
    if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
        run-parts /etc/logrotate.d/httpd-prerotate; \
    fi; \
endscript
}

Changed "create 640 root adm" to "create 640 syslog adm" and errors ended after next cron "daily" run.

相关内容