@bluepuma77 opened this Issue on August 6th 2021

I am running Matomo in a Docker container, I just upgraded from 4.3.1 to 4.4.1.

During upgrade in the browser Matomo told me to run the CLI command

php /var/www/html/console core:update

to migrate the database. I did within the container and at the end it showed me

It appears you have executed this update with user root:root, while your Matomo files are owned by www-data:www-data.

To ensure that the Matomo files are readable by the correct user, you may need to run the following command (or a similar command depending on your server configuration):

$ chown -R root:root /var/www/html

This was just wrong, after the command Matomo didn't work anymore.

Instead it needs to be

chown -R www-data:www-data /var/www/html

Not sure what the logic for the recommendation and the selected user:group is...

@sgiehl commented on August 6th 2021 Member

@bluepuma77 As the message points out. It checks if the files are owned by the user executing the update. In your case that was the root user, but the files were owned by another user/group. In general it might be good to execute the update with the user the files are owned by I guess.

@tsteur commented on August 8th 2021 Member

I think in this example we could mention that the command may be executed using the wrong user and not only suggest the chown command to prevent such cases.

@tsteur commented on February 7th 2022 Member

closing this one as a duplicate of https://github.com/matomo-org/matomo/issues/18746 and we'll work on that issue as part of the 4.9 release.

This Issue was closed on February 7th 2022
Powered by GitHub Issue Mirror