There is a workspace container (laradock - special under laravel), I go inside under the root command:
docker-compose exec -w / var / www workspace bash
and using a special command I create a file, for example:
php artisan make: model TestModel
It is created with the following rights:
-rw-r - r-- root root
And naturally in PhpStorm I have no rights to edit it.
What can I do to have the right to edit the files that I create inside the container on my local host?
I can do: chmod 777 on this file, and then there will be rights, but it needs to be done every time after every file creation.
In laradock in the .env file in the settings I have WORKSPACE_PUID = 1000 and WORKSPACE_PGID = 1000. My user on the local host has uid = 1000 (andrey) gid = 1000 (andrey) groups = 1000 (andrey).
Why it does not work, and on the local machine I do not have rights to the files that I create with
php artisan make ...