使用nginx和php-fpm进行设置,每个进程/文件的最终权限是什么?

I wonder what the user rights are after successfully setting nginx with php-fpm up.

Let's assume user aaa and bbb have their own home directory and their website. All users belongs 'hosting' group.

And there is 'nginx' user and 'nginx' group for NGINX process.

I want to know

  1. the ownership status of /var/run/php-fpm/www.sock file

  2. the ownership status of php-fpm process

  3. the ownership status of nginx process

  4. the ownership status of user's home directory.

Below pic is sample

enter image description here

the owner for php-fpm process is 'nginx'

the owner for nginx process is 'nginx'

the owner of the file www.sock is 'nginx' too.

---------------- What I expect is ----------------

  1. the ownership status of /var/run/php-fpm/www.sock file

    php-fpm socket file >> nginx:nginx 0660

  2. the ownership status of php-fpm process

    php-fpm process for aaa >> aaa:hosting php-fpm process for bbb >> bbb:hosting

  3. the ownership status of nginx process

    nginx >> nginx:nginx

  4. the ownership status of user's home directory.

    home file : {username}:hosting 0604 home dir : {username}:hosting 0705 parent of home dir : o+x (because)