Closed stockmind closed 5 years ago
Thanks for this. Have you verified that there are no permission issues for php-fpm to read files on mounted volumes?
I use this configuration on my production server to let Lumen works correctly for reading and writing logs and other files, the host folder owner user (that is not root) and www-user are configured with same id so everything works as expected. Otherwise, you need to assign "nobody" user every time on the folder and files you want to write... this change prevents loose permissions on those folders and files to get everything working
Without this there were no way to write on the Lumen logs folder if it was owned by the host user other than open it with 777 (bad) or changing the group or user to the same id of the nobody docker server instance (this breaks syncs with ssh or ftp as you need to fix every time the owner)
Gotcha, I've confirmed what you said.
add a www-user and config it on php-fpm to let php permissions works as expected. The build args PUID and PGUID are useful to bind the www-user id with an host user id.
This will avoid writing and reading permissions error from php and will let a better management of the php user permissions