1

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 Answers1

0

The phpinfo() output is misleading. It is highly likely that mpm_itk is actually executing code as the right user.

If you call get_current_user() in your php script, you will see that it's not executed by apache but by the owner of the script/the configured user. same for doing a system(id) call.

ixs
  • 101
  • 1