• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Problem with CGI + Openbase_dir

VinMhas

New Pleskian
Since I've installed the last update, then i've got a problem with the OpenBase_dir directive of PHP.
For example I've got three domains on my Plesk 11.0.9-server. All domains are configured with CGI.

If i change the Openbase_dir directive on domain 1, then it also changes for example domain3 among others..
This results in a broken website. If i visit domain3 i receive the following error-message:

Warning: require(): open_basedir restriction in effect. File(/var/www/vhosts/domain3.com/httpdocs/wp-blog-header.php) is not within the allowed path(s): (/var/www/vhosts/domain1.com/:/tmp/) in /var/www/vhosts/domain3.com/httpdocs/index.php on line 17 Warning: require(/var/www/vhosts/domain3.com/httpdocs/wp-blog-header.php): failed to open stream: Operation not permitted in /var/www/vhosts/domain3.com/httpdocs/index.php on line 17 Warning: require(): open_basedir restriction in effect. File(/var/www/vhosts/domain3.com/httpdocs/wp-blog-header.php) is not within the allowed path(s): (/var/www/vhosts/domain1.com/:/tmp/) in /var/www/vhosts/domain3.com/httpdocs/index.php on line 17 Warning: require(/var/www/vhosts/domain3.com/httpdocs/wp-blog-header.php): failed to open stream: Operation not permitted in /var/www/vhosts/domain3.com/httpdocs/index.php on line 17 Fatal error: require(): Failed opening required './wp-blog-header.php' (include_path='.:') in /var/www/vhosts/domain3.com/httpdocs/index.php on line 17

If I configure all the domain as a Apache-module, then the problem doesn't happen.



What's wrong?
 
Last edited:
How are you changing that openbase dir? As far as I know, each of domain have its own php settings for this, so I'm not sure how they connect? Are you going that under Websites & Domains -> scroll down and click on domain name -> PHP Settings tab -> openbase dir
 
How are you changing that openbase dir? As far as I know, each of domain have its own php settings for this, so I'm not sure how they connect? Are you going that under Websites & Domains -> scroll down and click on domain name -> PHP Settings tab -> openbase dir

That's correct! If i set a openbase_dir restriction ( let's say: [docroot:/:tmp/] or or [webspaceroot]/:[tmp:/] ) then this will affect other domains as well. Could this be a bug in 11.0.9?
To clarify: i set the openbase_dir for domain1 at [webspaceroot]/:[tmp:/] ( that would be /var/www/vhosts/domain.com/httpdocs ). If i do so, then the same restriction applies for other domain.
If i visit domain2 through my webbrowser, then i receive a message an openbase error. Domain2 can only access files in Domain1.

It seems that the openbase_dir has a global effect on the server.
 
Of course it has, since all domains are in same subscription. Try to put absolute path like /var/www/vhost/domain.com/httpdocs/your directories
 
Back
Top