Auto archiving cron job doesn't work anymore due to lack of rights

Since I upgraded to Piwik 2.9.1 I get the following error with my auto archiving cron job:

Error: You can’t access this resource as it requires a superuser access

When I try web cron with token_auth in my browser it works fine.
How can I make the server cron work again?

Hi rddr, oh that’s strange. can you paste the command used and full output? (without your token_auth !)

This is the command for the cron:


/usr/bin/php5 /var/web/pathto/domain/piwik/misc/cron/archive.php --url=http://domain/piwik

And this comes as output:


INFO [2014-12-05 14:05:01] [4d6e8] ---------------------------
INFO [2014-12-05 14:05:01] [4d6e8] INIT
INFO [2014-12-05 14:05:01] [4d6e8] Piwik is installed at: https://domain/piwik/index.php
INFO [2014-12-05 14:05:01] [4d6e8] Running Piwik 2.9.1 as Super User
INFO [2014-12-05 14:05:02] [4d6e8] ---------------------------
INFO [2014-12-05 14:05:02] [4d6e8] NOTES
INFO [2014-12-05 14:05:02] [4d6e8] - Reports for today will be processed at most every 3600 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO [2014-12-05 14:05:02] [4d6e8] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO [2014-12-05 14:05:02] [4d6e8] - Archiving was last executed without error 7 Tage 23 Stunden ago
ERROR [2014-12-05 14:05:02] [4d6e8] Sie können auf die Ressource nicht zugreifen, da Sie dafür mindestens 'superuser' Rechte benötigen.
ERROR [2014-12-05 14:05:02] [4d6e8] Sie können auf die Ressource nicht zugreifen, da Sie dafür mindestens 'superuser' Rechte benötigen.

Can you try to change the command to the new one in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

(using console core:archive)

I think it will fix it!

I’ve already tried


/usr/bin/php5 /var/web/pathto/domain/piwik/misc/cron/archive.php core:archive --url=http://domain/piwik

but get the same output as mentioned above.

it should be:

/usr/bin/php5 /var/web/pathto/domain/piwik/index.php core:archive --url=http://domain/piwik

If you still have issue with you hosting, you may try external cron job (easycron.com) which starts processes on the URL and a tutorial at How to set up cron job for Piwik.