• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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