@broros opened this Issue on February 4th 2020

my server does not use user (www-data:www-data), it uses a custom username
and my folders in /tmp/ are already set to 755

this happened after setting up cron job

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 /home/revelhost/domains/analytics/public_html
find /home/revelhost/domains/analytics/public_html/tmp -type f -exec chmod 644 {} \;
find /home/revelhost/domains/analytics/public_html/tmp -type d -exec chmod 755 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/assets -type f -exec chmod 644 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/assets -type d -exec chmod 755 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/cache -type f -exec chmod 644 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/cache -type d -exec chmod 755 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/logs -type f -exec chmod 644 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/logs -type d -exec chmod 755 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/tcpdf -type f -exec chmod 644 {} \;
find /home/revelhost/domains/analyticspublic_html/tmp/tcpdf -type d -exec chmod 755 {} \;
find /home/revelhost/domains/analytics/public_html/tmp/templates_c -type f -exec chmod 644 {} \;
find /home/revelhost/domains/analytics/public_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.
@tsteur commented on February 4th 2020 Member

refs https://github.com/matomo-org/matomo/issues/13993

Thanks for letting us know @broros

I suppose Matomo should not return a default user name as this is certainly not accurate in https://github.com/matomo-org/matomo/blob/3.13.2-rc1/core/Filechecks.php#L152-L168

@broros commented on February 4th 2020

I think it has something to do with my cron job command

@broros commented on February 4th 2020

I originally got this message and changed to the directory to 777

all my folders are set to 755

An error occurred
The directory "/home/revelhost/domains/analytics/public_html/tmp/cache/tracker/" is not writable.
@broros commented on February 4th 2020

I got this fixed by disabling ( 2enconf php7.3-fpm ) it was running my folders as www-data

@tsteur commented on February 4th 2020 Member

Thanks for letting us know @broros

This Issue was closed on February 4th 2020
Powered by GitHub Issue Mirror