I have set up a cron job for running Piwik’s archive task - it looks like this (from /etc/crontab):
05 * * * * www /usr/local/www/piwik/misc/cron/archive.sh > /dev/null
It doesn’t work, and every time it runs, I get a mail with an error message like this one:
Warning: chdir(): Permission denied (errno 13) in /usr/local/www/piwik/core/Config.php on line 171
I don’t understand why Piwik is trying to chdir here, and if I run the command via sudo (sudo -u www /usr/local/www/piwik/misc/cron/archive.sh), it runs without complaints.
Any idea what’s going on?