System forgets writing permissions

From time to time invoice ninja send me “config.php is not writeable” - but i gave permission like the documentation said and even tried the troubleshooting technique…
dont know what to do.

Ubuntu 22.04
PHP 8.1
Invoice Ninja v5.5.57-C105

Hi,

@david do you have any ideas?

What permissions are set on config.php and other files if you do ls -lha in the directory?

Are the Cron entries being run as the same user as your webserver?

@apeisthere

most likely you are running

php artisan optimize

as your own user, rather than the webuser, you can run the command as they web user by prefixing the command as follows

sudo -u www-data php artisan optimize

this will keep the file permissions in order.

so far so good. it looks like that helps. thanks for your help!