N
N
NoName_02016-10-13 22:45:05
PHP
NoName_0, 2016-10-13 22:45:05

Php-fpm, permissions help?

Need help . I can’t make friends with php-fpm in any way, the problem is this: there is a virtual machine in which nginx runs in conjunction with php-fpm , everything seems to be fine, but in order to develop the site normally from the host machine, you need to forward the folder with the code there, so here, I did it all, gave the rights to nginx (runs as root) and it works fine, that is, it normally displays html files, but when I screw php-fpm there on the socket, problems begin. pops up "file not found" . and this is only with my folder (which is thrown from the host), it can process ordinary folders and files. what he just didn’t do, and gave fpm the rights of the root (swears) and changed the owner of the folder to the one who runs fpm - nothing happens. In general, help the idiot, please ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Skobkin, 2016-10-13
@NoName_0

php-fpm on a socket problems begin. pops up "file not found"

Most likely because it can't get access. Or not looking there.
Purely for information. php-fpm has a "-R" switch to run as root. But you don't have to do that .
Both nginx and a specific FPM pool should work for you (work != run - both run from root initially) from one user (or group, but it will be easier for you with a user). For example www-data.
For both, this user is configured in the config. For nginx - in the main, for the php-fpm pool - in the config of a specific pool (different pools can work from different users).
And the directory from the host in the virtual machine must also be mounted with the rights for the same user.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question