Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong chown recommendation during upgrade #17862

Closed
bluepuma77 opened this issue Aug 6, 2021 · 3 comments
Closed

Wrong chown recommendation during upgrade #17862

bluepuma77 opened this issue Aug 6, 2021 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. duplicate For issues that already existed in our issue tracker and were reported previously. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@bluepuma77
Copy link

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
Copy link
Member

sgiehl commented Aug 6, 2021

@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 tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Aug 8, 2021
@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Aug 8, 2021
@tsteur tsteur added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Bug For errors / faults / flaws / inconsistencies etc. labels Aug 8, 2021
@tsteur
Copy link
Member

tsteur commented Aug 8, 2021

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 tsteur added the duplicate For issues that already existed in our issue tracker and were reported previously. label Feb 7, 2022
@tsteur
Copy link
Member

tsteur commented Feb 7, 2022

closing this one as a duplicate of #18746 and we'll work on that issue as part of the 4.9 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. duplicate For issues that already existed in our issue tracker and were reported previously. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

4 participants