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!

Anyone using the Php open_basedire tweek?

Discussion in 'General Discussion' started by sexy_guy, Jul 30, 2003.

  1. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    166
    php open_basedir Tweak
    Php's open_basedir protection prevents users from opening files outside of their home directory with php.

    Did anyone run this? If so, how is it running?

    cPanel.net Support Ticket Number:
     
  2. FWC

    FWC Well-Known Member

    Joined:
    May 13, 2002
    Messages:
    354
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Ontario, Canada
    I've played with it. And it works as advertised. So the vBulletin control panel throws an error trying to get at /proc/loadavg. And PhotoPost will break from not being able to get to /usr/local/bin/mogrify. I haven't had time yet, but I am going to edit /scripts/phpopenbasectl and add these paths and try it again.
     
  3. www-lab

    www-lab Well-Known Member

    Joined:
    Feb 1, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    156
    I'm using that feature and I requested it :)

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. raventec

    raventec Well-Known Member

    Joined:
    Apr 19, 2003
    Messages:
    120
    Likes Received:
    0
    Trophy Points:
    166
    So far so good here. No reports of problems. I do most of the php and cgi installs for most of my clients though, and I tend to select scripts that don't need to go wandering around outside of their directories ;)

    cPanel.net Support Ticket Number:
     
  5. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    316
    I tried it as well, but disabled it again, because I'm using a SSL certificate which I call like this:

    https://secure.servername.ch/~username

    Unfortunately then I get the message, that I open a file which is outside my home directory. But this is not true at all...

    I did not have enough time to test it out.

    Mike

    cPanel.net Support Ticket Number:
     
  6. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    166
    Ok, but i would have thought that you would have opened up httpd.conf and for that sites with the cert, commented out the open BD directives for that site.

    cPanel.net Support Ticket Number:
     
  7. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    214
    Likes Received:
    2
    Trophy Points:
    168
    Will the open_basedir option in WHM automatically add the open_basedir config to all NEW accounts when they're setup in the future, or only the existing ones?

    cPanel.net Support Ticket Number:
     
  8. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
    It will add it to all new accounts, too.

    cPanel.net Support Ticket Number:
     
  9. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    214
    Likes Received:
    2
    Trophy Points:
    168
    ok thanks that's good to know. Just one last question .. why is it that the /tmp directory is added in open_basedir, why not /home/username/tmp since every user has a tmp dir on cpanel boxes anyway?

    cPanel.net Support Ticket Number:
     
  10. mmkassem

    mmkassem Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    390
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Egypt
    tmp inside the user dir is not used for saving temp files generated through Apache

    But /tmp is used for sessions, attachments and many others stuff.

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. thrax

    thrax Registered

    Joined:
    Dec 23, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    151
    issues with photopost and cpanel

    I have read through here and it sounds like a solution was come accross for the problem can someone let me know what it is as I am haveing hte same issue.

    Thanks in advance

    Jay

    Warning: chdir(): No such file or directory (errno 2) in /usr/home/users/localrid/public_html/photopost/header-inc.php on line 12

    Warning: main(mainfile.php): failed to open stream: No such file or directory in /usr/home/users/localrid/public_html/photopost/header-inc.php on line 13

    Fatal error: main(): Failed opening required 'mainfile.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/home/users/localrid/public_html/photopost/header-inc.php on line 13
     
  12. McRox

    McRox Member

    Joined:
    Nov 20, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    NL
    Re: issues with photopost and cpanel

    Disabling openbase_dir for the domain "secure.servername.ch" might help I think. (Not sure if that fixed it for moduserdir or openbasedir)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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