Answer the question
In order to leave comments, you need to log in
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
You need to change the user in php-fpm, these are the user and group parameters.
Put olya there
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question