Answer the question
In order to leave comments, you need to log in
How to give access to a folder from another group to another user php-cgi + nginx?
There is a server with nginx+phpcgi
Two domains:
domen.one, path: var/www/user_one/data/www/domen_one/, user: user_one, group user_one
domen.two, path: var/www/user_two/data/www/ domen_two/, user: user_two, group user_two
There is a folder: var/www/user_one/data/www/domen_one/images
We need to enable php in domen.two interpreter to give access to this folder.
If you add user_two to the user_one group, then when checking via shell or exec, there is access to the folder, but file_get_contents() or scan_dir() give: permission denied.
How to implement the necessary functionality correctly?
Answer the question
In order to leave comments, you need to log in
If you add user_two to the user_one group, then when checking via shell or exec, there is access to the folder, but file_get_contents() or scan_dir() give: permission denied.
sudo find /var/www/ -type f -exec chmod 660 {} \;
sudo find /var/www/ -type d -exec chmod 770 {} \;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question