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!

Setting open_basedir = ~/public_html in php.ini results in access denied

Discussion in 'Security' started by PeteS, Feb 13, 2018.

Tags:
  1. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    124
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    124
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Ummm... Are you saying it must be set per user, in their own php.ini file? (I also noted there was a bug in v66 relating to this; possibly that's what you are referring to?) Why do that doc specify "~/public_html" if it doesn't work? (It actually seems exactly right to me, but it doesn't work.)

    Maybe this will help: I'm using FPM on some sites (that works per the docs), and some CGI handler (fails). FastCGI mod is installed but doesn't show as an option in non-FPM handlers. SuPHP no installed because it's 5 years out of date. mod_ruid no installed.

    I'm sure I'm just not understanding something correctly...
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    The documentation includes the following note:

    Thus, the documented setting is only application to mod_php (DSO). If you are using a PHP handler other than DSO, then you must set that value for each account in their individual php.ini files as noted in the thread linked in my last response. The exception to that is PHP-FPM, as with PHP-FPM you must set the value using the instructions on the following post:

    PHP-FPM configuration settings

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    124
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Doht! Thanks... I read that line several times and never converted it to "DSO" in my brain. I makes sense now.
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice