P
P
p19e0n2019-03-29 12:56:26
linux
p19e0n, 2019-03-29 12:56:26

How to correctly distribute rights between nginx and the CMS engine folder?

Good afternoon, I ran into a problem:
I installed nginx and it starts from www-data, but the root of the site lies along the path /home/olya/www/site.
Accordingly, CMS-Modx, when using composer, set the owner and rights of all engine files to the user olya.
But nginx, which is run as a user www-data, cannot execute, edit, or even view most of the engine's files.
I tried to run nginx as user olya by changing the file nginx.conf:
from user www-data;
to user olya;
But nothing changed.
Tell me how should I be?
PS: Now I'm running nginx from www-data, after changing the group and username of all engine files to www-data.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OnYourLips, 2019-03-29
@p19e0n

You need to change the user in php-fpm, these are the user and group parameters.
Put olya there

T
TheAndrey7, 2019-03-29
@TheAndrey7

Ngnix is ​​a web server. He only knows how to distribute static. How do you manage to edit files through it? It should be running as www-data.
You need to look towards PHP.

D
Dmitry, 2019-03-29
@slo_nik

Good afternoon.
You need to use the libapache2-mpm-itk package .
How to use it correctly you will find in my question / answer .
At the first link in the answer you will find the settings for nginx.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question