How to disable Plesk open_basedir restriction in effect

Some applications require open_basedir to be “loosened” a little, if you are installing an application such as ClickCart Pro then the open_basedir will need to be changed so that the installation can create the required sub directories and then complete.

Let’s assume your domain name is domain.com (no such luck, I know!)

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

Add the following lines:

<Directory /var/www/vhosts/domain.com/httpdocs>
php_admin_value open_basedir “/var/www/vhosts/domain.com”
php_admin_flag safe_mode off
</Directory>

Now we need to rebuild the apache configuration:

# /usr/local/psa/admin/sbin/websrvmng -u –vhost-name=domain.com

Job done, your open_basdir setting has been moved up one level (from /httpdocs to /) within your domain name sub folder.

Was this helpful?
How to disable Plesk open_basedir restriction in effect written by admin average rating 3/5 - 2 user ratings

2 thoughts on “How to disable Plesk open_basedir restriction in effect”

  1. Hello, what follows might work for some,

    But I can’t get it to work :s.. I have a subdomain that tries to access another subdomain of the same main domain. Note that I changed subdomains and domain names to domain.com and sdomain1 and 2.

    The folders on the subdomain is on the same level as httdocks :

    I have these folders:
    httdocks
    sdomain1 (that tries to access sdomain2)
    sdomain2

    Here is what I did so far:
    vi /var/www/vhosts/domain.com/conf/vhost.conf

    In the file “vhost.conf” I have:

    php_admin_value open_basedir “/var/www/vhosts/domain.com”
    php_admin_flag safe_mode off

    Saved then:
    /usr/local/psa/admin/bin/httpdmng –reconfigure-all

    And then reloaded apache:
    /etc/init.d/apache2 reload

    But I still get the error:
    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/domain.com/sdomain2) is not within the allowed path(s): (/var/www/vhosts/domain.com/sdomain1/:/tmp/) in /var/www/vhosts/domain.com/sdomain1/folder_access.php on line 5

    What could be wrong ? 😛

  2. Of course in the vhost.conf file, I have the Directory etc, it just got deleted when I posted the comment, so I remove the starting
    php_admin_value open_basedir “/var/www/vhosts/de915.ispfr.net”
    php_admin_flag safe_mode off
    /Directory>

Comments are closed.