Comment 2 for bug 1252467

Revision history for this message
Matthijs van Wageningen (matthys70) wrote :

I can confirm this problem and wonder if there is any 'real' solution ?

After upgrading to 13.10 there was no problem, until log rotate.
Previous files had 644 for root:adm, now 640 for root:adm
The cron-job for awstats runs as www-data as mention above.

This cause error message when job runs:
Error while processing /etc/awstats/awstats.conf
Create/Update database for config "/etc/awstats/awstats.conf" by AWStats version 7.1.1 (build 1.989)
From data in log file "/var/log/apache2/access.log"...
Error: Couldn't open server log file "/var/log/apache2/access.log" : Permission denied
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

$ cat /etc/cron.d/awstats
MAILTO=root

*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

# Generate static reports:
10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh