Open_BaseDir - On or off?

Discussion in 'Site & Server Administration' started by fordP, Sep 25, 2007.

  1. #1
    I'm trying to setup a script on a subdomain in plesk which is linked to another script in mydomain.com/httpdocs/ while the forum is in mydomain.com/subdomains/forum/httpdocs

    So.. Do I want to modify the Open_BaseDir, or is it that I need to disable openbase_dir so I can link them like this

    from mydomain.com/httpdocs/example.php i want to include config.php which is located in /mydomain.com/subdomains/forum/httpdocs using "../subdomains/forum/httpdocs/config.php"

    and I want this ability in both /httpdocs and /subdomains...

    So.. is it that I need to disable open_basedir, or enable it and modify the path in a vhosts.conf file?

    I'm totally lost here and this downtime on my site is killing me. Anyone have any good articles or anything? I've been struggling with this for hoursss.
     
    fordP, Sep 25, 2007 IP
  2. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Keep it unset. ;)
     
    agnivo007, Sep 26, 2007 IP
  3. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If it's only your sites on the server disable it. If you have other sites that are not yours I suggest you modify the vhosts.conf file to include the extra path.
     
    InFloW, Sep 26, 2007 IP
  4. fordP

    fordP Peon

    Messages:
    548
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Any ideas how to disable it?
     
    fordP, Sep 28, 2007 IP
  5. Davidj

    Davidj Peon

    Messages:
    124
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Don't dare remove it, modify it so that both sites can access the same directory. Removing it will result in problems later on down the road when you get exploited -- bad, bad idea.

    Remember the statement above: 'when you get exploited', not 'if you get exploited'.
     
    Davidj, Oct 1, 2007 IP
  6. travelmate

    travelmate Active Member

    Messages:
    273
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #6
    Do you know how to make off on lxadmin my open_basedir ?
     
    travelmate, Apr 19, 2009 IP
  7. Atulya

    Atulya Guest

    Messages:
    142
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    To disable open_basedir for the domains, you need to make the following changes.

    1. Create a file called "vhost.conf" under the "conf" directory of each of the domain.

    >> vi /var/www/vhosts/domain.com/conf/vhost.conf

    2. Add the following lines to it.

    =================
    <Directory /var/www/vhosts/domain.com/httpdocs>
    php_admin_value open_basedir none
    </Directory>
    =================

    3. Update Plesk configuration by running the following command.

    >> /usr/local/psa/admin/sbin/websrvmng -v -a

    4. Restart Apache.

    >> /etc/init.d/httpd restart

    That is it!!
     
    Atulya, Apr 19, 2009 IP