Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

EA4: perl cgi under nobody

Discussion in 'EasyApache' started by rch7, Sep 25, 2017.

  1. rch7

    rch7 Registered

    Joined:
    Sep 25, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
    
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. rch7

    rch7 Registered

    Joined:
    Sep 25, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    PHP-FPM works for PHP, but Perl scripts run under Apache (nobody) and are not part of the PHP handler.

    Thank you.
     
Loading...

Share This Page