I noticed that the Laravel by default creates folder with '755' permission. That means that the user www-data, with Nginx, is the owner of the created folder.
When i setup a worker, this is runned with the system user (user "forge", for example).
If I have a job that tries to create a subfolder inside a folder created by Laravel, I have a permission issue, because the forge user can't run a mkdir inside a 755 folder of www-data.
What can I do to fix this?
One possibility is to set the default permission of created folder to 775, but I don't how to do it.
What I normally do is to change nginx and php-fpm users to an actual user on my system, and then run any deployment, cron jobs and processes with the same user. Also, I change the npm global bin folder to a folder like ~/.npm/bin and put it on my PATH
I dont know if this aproach is correct but it is a breeze to manage everything