Cannot update system because config.php is not writable

I am trying to update my self hosted installation from v5.3.54 to v5.517 via the frontend and get the following error in the storage/logs/laravel.log:
[2022-09-14 17:48:59] production.ERROR: Cannot update system because config.php is not writable {"userId":1,"exception":"[object] (App\\Exceptions\\FilePermissionsFailure(code: 0): Cannot update system because config.php is not writable at /var/www/at_binary-alps_rechnungen/app/Http/Controllers/SelfUpdateController.php:104)

permissions have been set with the following commands:

sudo chown -R www-data:www-data .
sudo find ./ -type d -exec chmod 755 {} +

Am I missing a permission setting or did I set the permissions wrong?

Thanks for any help!

BR,
Fabian

I’m not an expert but you try

sudo chmod -R 775 .

in my http root is 775

regards

Thanks for the hint but I would expect that 755 is correct according to the “File Permissions” section in the docs: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja

BR,
Fabian

I’m having the same issue.
I ran:
sudo chown -R www-data:www-data /var/www/html
but that didn’t help. Would anyone be able to help?

You may also need to run

sudo find ./ -type d -exec chmod 755 {} \;