rch7

Member
Sep 25, 2017
14
1
3
North America
cPanel Access Level
Root Administrator
Hello everybody,

I'm trying to migrate to new server. It is EA4 on cpanel 11.66.0.23 and centos 7.
It is setup to use mod_mpm_event and php56-php-fpm. Php runs fine under user account id.

But perl/cgi scripts run under nobody with mod_cgid. On old server it was suexec I think. Mod_ruid2 is not compatible with this setup as far as I understand.

How is it supposed to work? Is there way to fix perl/cgi to switch to user account id as expected without going to completely different mpm or php setup?

Code:
/etc/redhat-release:CentOS Linux release 7.4.1708 (Core)
/usr/local/cpanel/version:11.66.0.23
/var/cpanel/envtype:standard
CPANEL=stable
access:root
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

You'd need to use the ITK MPM to have the Apache process to switch to the domain owner's user identifier (UID) and group identifier (GID) before it responds to the request. This MPM option is documented at:

Apache Module: MPM ITK - EasyApache 4 - cPanel Documentation

You can still use PHP-FPM with the ITK MPM. You won't be able to use Mod_Ruid2, however since you are using PHP-FPM and not DSO, Mod_Ruid2 would not have been utilized.

Thank you.
 

rch7

Member
Sep 25, 2017
14
1
3
North America
cPanel Access Level
Root Administrator
mod_mpm_itk doesn't work with threads as far as I understand? It defeats the purpose of my setup.

I had assumed if you switch uid for php scripts using mod_mpm_event and fpm, it should be similar way to do it for perl scripts.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I had assumed if you switch uid for php scripts using mod_mpm_event and fpm, it should be similar way to do it for perl scripts.
PHP-FPM works for PHP, but Perl scripts run under Apache (nobody) and are not part of the PHP handler.

Thank you.