Either running the cron job as root or allowing www-data to read the apache log files are bad ideas. Instead you want to create a new user and add it to the www-data and adm groups and make the cron job execute as that user. I called mine "awstats":
useradd awstats && usermod -a -G www-data awstats && usermod -a -G adm awstats
Either running the cron job as root or allowing www-data to read the apache log files are bad ideas. Instead you want to create a new user and add it to the www-data and adm groups and make the cron job execute as that user. I called mine "awstats":
useradd awstats && usermod -a -G www-data awstats && usermod -a -G adm awstats
Seems to work like a charm.