• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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