• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Issue PHP open_basedir 'not within the allowed path(s)'... but it is

Erwan

Regular Pleskian
Hi all,

We have 2 subscriptions with one domain we have on a Plesk server that work perfectly.
We must migrate this 2 subscriptions on a new server (Centos end of life => debian).

We have simulate it. All works only one thing: the domain 2 can not access to the files to the domain 1.
The directory is always on the "open_basedir" configuration of the domain 2:

{WEBSPACEROOT}{/}{:}{TMP}{/}{:}/var/www/vhosts/mydomain1/httpdocs

But we have this error:
open_basedir restriction in effect. File(/var/www/vhosts/mydomain1/httpdocs/dir1/) is not within the allowed path(s): (/var/www/vhosts/mydomain2/:/tmp/:/var/www/vhosts/mydomain1/httpdocs)

What's the problem? Why does it work on the current server and not the new one?

Same problem if i use the same directory:
open_basedir restriction in effect. File(/var/www/vhosts/mydomain1/httpdocs/dir1/) is not within the allowed path(s): (/var/www/vhosts/mydomain2/:/tmp/:/var/www/vhosts/mydomain1/httpdocs/dir1)

An idea? Thank you.

Erwan
 
I had the same issue with PHP 7.4.21: PHP: PHP 7 ChangeLog
This bugfix gave the same error you are getting:
- Fixed bug #76359 (open_basedir bypass through adding "..").

I couldn't find a solution so temporarily switched to PHP 7.3.30
 
I thought you have found the problem Maartenv... but websites are under PHP 7.3... :(
Thanks anyway.

If you are another idea, do not hesitate. I still have the problem.
 
Add the trailing / and try again. All the other paths have a / at the end, so yours should too.
 
I've already try it:
{WEBSPACEROOT}{/}{:}{TMP}{/}:/var/www/vhosts/mydomain1/httpdocs/
{WEBSPACEROOT}{/}{:}{TMP}{/}{:}/var/www/vhosts/mydomain1/httpdocs/
{WEBSPACEROOT}{/}{:}{TMP}{/}{:}/var/www/vhosts/mydomain1/httpdocs{/}

:(
 
Back
Top