Try to look for a solid answer, but nothing yet. My current setup is as follow:
- local ubuntu server
- docker
- laravel application
When the ownership of storage/ and bootstrap/ are set to www-data:www-data (chown) the app is working well. The only issue I have is when I try to run composer or artisan commands it will give me an error:
Generating optimized autoload files Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi UnexpectedValueException The stream or file "/home/amplr/portal.amplr.be/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied
When I set the ownership back to the ubuntu user, composer and artisan work, but the app throws the permission error. I have to chown back to www-data:www-data after i finished my composer commands.
What am I doing wrong?