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.

Open basedir Issue

Discussion in 'General Discussion' started by silversurfer, Sep 8, 2003.

  1. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Hi.

    Since enabling Open Basedir on my servers, I am getting this problem when intermittenly, the user seem to be attempting to access other directories when you run a script.

    For an example:

    Warning: Unknown(): open_basedir restriction in effect: File (/home/user1/public_html/script.php) is not within the allowed path(s): (/home/someotheruser:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on Line 0

    Any idea why this is happening and how can this be fixed?

    Thanks

    cPanel.net Support Ticket Number:
     
  2. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    I had this problem, too. The only way I could fix it was to enable open basedir on every account.

    cPanel.net Support Ticket Number:
     
  3. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    Any fix on this yet ??

    I get this to.
    One user is not allowed to run something because it's
    not within ANOTHER USERS paths.

    How crazy is that ??!!
     
  4. Setheronie12

    Setheronie12 Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Disable openbasedir on the accounts that need to access other files, like resellers who need to access /usr/local/cpanel/cpanel/Accounting.inc.php . The resason that I have it enabled on all my accounts because I really dont want them runnin this

    include('/home/account/forum/config.inc.php');

    and then they could have the username and password to my MySQL, so I keep this one.

    Sorry if that was confusing
     
  5. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    It is disabled for those who need it to be disabled.
    Bit for those that only will be within their own directory it i son BUT still doesn't work becuase the are allowed to be within someone eleses path but not thier own paths ?!
     
  6. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    bump, we are having this issue too. We have disabled openbasedir on our own site yet we are getting restriction errors.

    Warning: Unknown(): open_basedir restriction in effect. File(/home/mtpd/public_html/support/admin/index.php) is not within the allowed path(s): (/home/someotherusersname:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

    Warning: Unknown(/home/mtpd/public_html/esupport/admin/index.php): failed to open stream: Operation not permitted in Unknown on line 0

    Warning: (null)(): Failed opening '/home/mtpd/public_html/support/admin/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
     
  7. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    What do you mean? If i have a subdomain called support on my own site and other do as well openbasdir should not be giving me errors telling me im trying to access somebody elses directory espeically when openbasedir is not enabled for any of our own sites.
     
    #7 mr.wonderful, Jun 1, 2004
    Last edited: Jun 1, 2004
  8. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    ??

    He, we don't. Please read the post again ;-)
     
  9. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    Hi, it's the "allowed path" that is wrong for the domain.
     
  10. Liam Gladdy

    Liam Gladdy Member

    Joined:
    Oct 7, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    We have a simular issue,

    open_basedir line in apache contains the subdomains owners account as a valid path, not the subdomain user..

    For example:
    www.domain.com - account: domain
    www.sub.domain.com - account: sub

    Sub's basedir restriction would be "/home/domain", instead of "/home/sub". This effects all subdomains on the domain.

    The only workaround is to disable open_basedir.

    --Liam Gladdy
     
  11. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    If I enable it again it works,
    Then it comes back after a while and then if you
    go to it in whm again and press the button it's ok again.

    Something screws up when someone doing something
    with apache.

    Does it show the correct path in httpd.conf or is it
    changed ythere as well ?
     
  12. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    I have the same problem here.

    If I enable phpsuexec, open_basedir is useless, right? So I can switch to phpsuexec and disable open_basedir?
     
Loading...

Share This Page