All files have root (instead of www-data) permission after running php upgrade_v3.php. Is this OK?

Your software: Mautic 2.16.5 β†’ Mautic 3.2.4 (Docker)
My PHP version is : 7.3
My MySQL/MariaDB version is (delete as applicable): MySQL5.7

Updating/Installing Errors
Upgrading/installing via (delete as applicable) : Command Line
php upgrade_v3.php

These errors are showing in the installer :
No errors. Upgrade script runs successfully but all files show root permission. I think that may be the cause of file write issues I encounter later after the upgade.

Your problem
My problem is :
All files show root permission instead of www-data. Is that expected? I suspect it’s the reason why I still have issues when I finally upgrade to 3.3.3.

What permission should the upgrade_v3.php have and what user should I run it in?

Steps I have tried to fix the problem :
I’ve ran it with:
sudo php upgrade_v3.php
sudo -u www-data php upgrade_v3.php
sudo chown -u www-data:www-data upgrade_v3.php and then running

UPDATE/CLARIFICATION: I still ran upgrade_v3.php with root permission but applied the sudo chown -R www-data:www-data * to the Mautic directory afterwards before continuing with

sudo -u www-data php bin/console mautic:update:find
sudo -u www-data php bin/console mautic:update:apply

have you tried chown -u www-data:www-data * (on the whole Mautic directory)

No, but I checked earlier, and the html directory in /var/www/html does have www-data permissions set. Should everything in the Mautic directory including sub-directories have www-data permissions set? If so, I guess I could try to force update the permissions and see if I still get the file write issues after the upgrade.

yes try put it on the entire mautic directory

Yay, all right, that was it! Thanks!

1 Like