B
B
Baalim2015-03-24 17:50:33
CentOS
Baalim, 2015-03-24 17:50:33

How to make PHP scripts run as script owner (not apache user)?

nginx+php-fpm on Centos. in the folder of the user user1 (owner user1 / group user1) is the index1.php script. Runs from apache. but I would like it to run as user1.
the script creates a folder. you need to do it with the owner of the script.
there was something like that. but could not transfer to his situation.
vladimir-stupin.blogspot.ru/2011/10/fastcgi-php.html

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Petrikov, 2015-03-24
@RicoX

Replace regular apache with apache-mpm-itk and it will be possible for each virtual host to specify its own user.
UPD: added a link to an example wiki.hasanov.ru/ubuntu/apache_multi_users

H
He11ion, 2015-03-24
@He11ion

I don’t quite understand what prevents me from going to /etc/php-fpm.d/*.conf and changing the user and group values ​​there?

P
Puma Thailand, 2015-03-24
@opium

Upload your php fpm for each user separately with the rights of this user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question