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.

Running php under each user with Fastgci

Discussion in 'EasyApache' started by jerrywwssadad, Jul 31, 2017.

Tags:
  1. jerrywwssadad

    jerrywwssadad Registered

    Joined:
    Jul 31, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Hello, all

    I just switched to fastcgi for a shared hosting server. installed fcgi via EA4, changed handler to fcgi.

    Noticed that all websites will need others permission (e.g. 644, 755)

    Before we were using cgi + mod_ruid to separate each user, no others permission needed for each individual websites (permissions: 640, 750)

    How can I separate each user with fastcgi?

    I am a web developer with limited experience of these server setups. Please support!

    Thanks
     
  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
  3. jerrywwssadad

    jerrywwssadad Registered

    Joined:
    Jul 31, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Thank you for your response.

    I checked. suexec was installed.

    Before with cgi and ruid, we run all websites with ownership and permission like below

    user : user 750(dir)
    user : user 640 (files)

    After switched to fcgi, websites have to run with others permission

    user : user 755(dir)
    user : user 644 (files)

    Basically these were the steps I went through when switching to fcgi

    1. Setup experimental repo
    2. Provision the portfolio: All PHP Options + OpCache, using EA4 (since I will need OpCache)
    3. Install fcgi module using EA4, and then provision
    4. Change php handler using MultiPHP Manger (php56)
    5. Change php version for websites (php56)

    Am I missing something?
     
  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
    Hello,

    The mod_fcgid Apache module is not compatible with the mod_ruid2 or mod_mpm_itk Apache modules. Thus, if you wanted a similar setup, you'd need to switch back to CGI or DSO as the PHP handler.

    Thank you.
     
    linux4me2 likes this.
  5. jerrywwssadad

    jerrywwssadad Registered

    Joined:
    Jul 31, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Any way we can separate users and make php run under each user with fastcgi?
     
  6. 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
    Have you considered using PHP-FPM instead of the FCGId module? Documentation on PHP-FPM is found at:

    PHP-FPM - Documentation - cPanel Documentation

    Thank you.
     
Loading...

Share This Page