HI @balonik,
Thanks for paying attention.
The permission of all directories in /var/www are the same of those below.
ls -l /var/www
drwxrwxr-x 17 gitlab-runner www-data 4096 Jun 8 20:06 example.com
It seems something changes the permissions.
umask of gitlab-runner is 0002, which means that the new files and directories which are created have the right permissions.
@balonik
i found what the problem is, but i am not sure if the fix won’t break s.t. else
So, although user gitlab-runner is member of www-data its primary group is gitlab-runner
So in some cases it changes the group of the directory where copies files.
Now the question is can i change the primary group of gitlab-runner to www-data ???