Apache not running as user with mpm_itk

I have mpm_prefork and mpm_itk loaded with Apache (on CentOS). A httpd -M | grep mpm reveals the following:

 mpm_itk_module (shared)
 mpm_prefork_module (shared)

I my vhost configuration I have the following directives:

# Run as User
<IfModule mpm_itk_module>
    AssignUserId someuser someuser
    php_value session.save_path /home/someuser/session
</IfModule>

httpd -t returns OK and httpd services starts normally without any errors.

However, when I run phpinfo() from someuser.mydomain.com, I see the following: enter image description here

Apache still continues to run under the primary user and group.

How do I fix / debug?

Thank you.

1
задан 13 July 2018 в 07:38
1 ответ

Вывод phpinfo () вводит в заблуждение. Весьма вероятно, что mpm_itk действительно выполняет код от имени правильного пользователя.

Если вы вызовете get_current_user () в своем php-скрипте, вы увидите, что он выполняется не apache, а владельцем скрипта / настроенным пользователем. то же самое для выполнения системного (id) вызова.

0
ответ дан 4 December 2019 в 03:50

Теги

Похожие вопросы