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

applying ownership after reboot #316

Open
michelwigbers opened this issue Apr 26, 2023 · 1 comment
Open

applying ownership after reboot #316

michelwigbers opened this issue Apr 26, 2023 · 1 comment
Labels

Comments

@michelwigbers
Copy link

after reboot of the vm we have to apply the following:
An error occurred
Matomo couldn't write to some directories (running as user 'www-data').
Try to Execute the following commands on your server, to allow Write access on these directories:

chown -R www-data:www-data /var/www/html
find /var/www/html/tmp/assets -type f -exec chmod 644 {} \;
find /var/www/html/tmp/assets -type d -exec chmod 755 {} \;
find /var/www/html/tmp/logs -type f -exec chmod 644 {} \;
find /var/www/html/tmp/logs -type d -exec chmod 755 {} \;
find /var/www/html/tmp/tcpdf -type f -exec chmod 644 {} \;
find /var/www/html/tmp/tcpdf -type d -exec chmod 755 {} \;
find /var/www/html/tmp/templates_c -type f -exec chmod 644 {} \;
find /var/www/html/tmp/templates_c -type d -exec chmod 755 {} \;

If this doesn't work, you can try to create the directories with your FTP software, and set the CHMOD to 0755 (or 0777 if 0755 is not enough). To do so with your FTP software, right click on the directories then click permissions.
After applying the modifications, you can refresh the page.
If you need more help, try Matomo.org.

This is since matomo version 4.13.1

 matomo:
    image: <myimage>
    restart: always
    container_name: matomo
    volumes:
      - '/data/matomo/html/config/:/var/www/html/config/'
      - '/data/matomo/apache2/ssl:/etc/apache2/ssl'
      - '/data/matomo/apache2/sites-available/<customer>-ssl.conf:/etc/apache2/sites-available/<customer>-ssl.conf'
      - '/data/matomo/plugins/TagManager:/var/www/html/plugins/TagManager'
    environment:
      - MATOMO_DATABASE_HOST=mysql
    env_file:
      - ./matomo.env
    ports:
      - target: 443
        published: 443
        protocol: 'tcp'
        mode: 'host'
    networks:
      - papo
    logging:
      driver: "json-file"
      options:
        max-size: "20m"
        max-file: "3"
@J0WI J0WI added the question label Jun 23, 2023
@J0WI
Copy link
Collaborator

J0WI commented Jun 23, 2023

Do your host and container www-data have the same uid/gid? Do you use SELinux or user namespaces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants