I got a notification this morning that v5.2.17 is available to upgrade from v5.2.16. When I try run the update, I get the following error that my .htaccess file is not writable.
[2021-08-07 17:03:49] production.ERROR: Cannot update system because .htaccess is not writable {“userId”:2,“exception”:"[object] (App\Exceptions\FilePermissionsFailure(code: 0): Cannot update system because .htaccess is not writable at /var/www/clients/client4/web5/accounts/app/Http/Controllers/SelfUpdateController.php:104)
I have an .htaccess file in the web root folder, as well as one in the public folder. They are 644 and 755 respectively. I have changed these files to 666 and 777 respectively, but the update is still failing with the same error in the log.
Is there another .htaccess file that I’m missing, which is the one that’s trying to be updated?
You may want to try the upgrade again. The system does a recursive file check to ensure every file is writable by the webuser. If this passes the upgrade proceeds.
I tried the upgrade again, to no avail, however I’m getting the following error now (which I think is the real issue).
[2021-08-11 19:46:02] production.ERROR: SplFileInfo::isFile(): open_basedir restriction in effect. File(/var/www/clients/clientX/webX/accounts/…) is not within the allowed path(s): (/var/www/clients/clientX/webX/accounts:/var/www/clients/clientX/webX/private:/var/www/clients/clientX/webX/tmp:/var/www/accounts.XXXXXX.XXX/accounts:/srv/www/accounts.XXXXXX.XXX/accounts:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) {“userId”:2,“exception”:"[object] (RuntimeException(code: 0): SplFileInfo::isFile(): open_basedir restriction in effect. File(/var/www/clients/clientX/webX/accounts/…) is not within the allowed path(s): (/var/www/clients/clientX/webX/accounts:/var/www/clients/clientX/webX/private:/var/www/clients/clientX/webX/tmp:/var/www/accounts.inoventive.ca/accounts:/srv/www/accounts.XXXXXX.XX/accounts:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) at /var/www/clients/clientX/webX/accounts/vendor/codedge/laravel-selfupdater/src/helpers.php:36)
I’m not 100% sure on how to modify the directive to give InvoiceNinja what it’s looking for though.
i had about three errors pop up going from 5.2.5 to 5.2.17. the problem was the error was only visible for a split second and i had to record my screen and play it back and pause it to read the error.