@MArhEV opened this Issue on December 2nd 2020

Hi! After enabling crone archiving and installing maxmind extension I have restarted my server and after that I can see only Error page in my matomo.

There is a possibility that matomo-archive has not been properly configured (no user such as nginx, i have left that entry blank) and that caused my issue.

After stopping, reloading, restarting crond, restarting and reloading nginx the error page is still present.
Is there any possibility how to get rid of it without completely reinstalling matomo?

PS all permissions are properly set, before cron all worked fine

@sgiehl commented on December 2nd 2020 Member

Are you using different users for webserver and triggering the archiving cron?
What are the permissions for the directory /var/www/matomo/tmp/cache/tracker/ after cron ran?

Note: It should always be safe to clear the tmp directory of Matomo. All files should be recreated automatically when needed.

@MArhEV commented on December 2nd 2020

I have tried triggering cron with user nginx, but it showed me "permission denied" during running test command. I found that one user suggested removing user name from cron command so I followed his instructons :/
All files and directories are 0755 with user:group nginx:nginx.
After removing files in tmp, restarting crond and nginx, cache and tracker directories are now 0750.
Error page is still without change.

Furthermore, after once again removing ALL tmp directory and creating it manually as an empty dir and restarting nginx, error changed to "The directory "/var/www/matomo/tmp/cache/tracker/" does not exist and could not be created."

@Findus23 commented on December 2nd 2020 Member

with user nginx

Keep in mind that Matomo is not running with the nginx user, but the user your php-fpm setup runs with (e.g. www-data).

@pedrosanchezpernia commented on December 6th 2020

Same error after updating to version version 4.0.4

@tsteur commented on December 6th 2020 Member

@pedrosanchezpernia did you update the files manually for the matomo 4 upgrade? AS mentioned in previous comment you might need to run some chown command or so to make sure the webserver has write access for these files.

@pedrosanchezpernia commented on December 6th 2020

@tsteur yup, on console first php /var/www/matomo/console core:update
then chown -R root:root /var/www/matomo as stated in the update message

@pedrosanchezpernia commented on December 7th 2020

Ok, fixed with chown -R www-data:www-data /var/www/matomo , however I'm not sure if all matomo directory should by own by www-data

@tsteur commented on December 7th 2020 Member

Closing this one. Setting correct permissions should fix this issue 👍

@pedrosanchezpernia you could always set only specific files to www-data like /tmp and /matomo.js and /config and /misc/userandpiwik.js` for example

This Issue was closed on December 7th 2020
Powered by GitHub Issue Mirror