• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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 Urgent :( open_basedir problem

Erwan

Regular Pleskian
Server operating system version
AlmaLinux 9.4
Plesk version and microupdate number
18.0.65
Hi all,
We have a problem after migrate two websites : a website with the management platform, a website with the data.
We have resumed the previous configuration but have a problem with PHP and open_basedir restriction.

The 1st website directory (management) is: /var/www/vhosts/mydomain.com/httpdocs/
The 2nd website directory (data) is: /var/www/vhosts/mydomain2.com/httpdocs/

We have defined PHP open_basedir in the plesk PHP config from the domain 1:
{WEBSPACEROOT}{/}{:}{TMP}{/}{:}/var/www/vhosts/mydomain2.com/httpdocs{:}/var/www/vhosts/mydomain2.com/httpdocs/{:}/var/www/vhosts/mydomain2.com/httpdocs//

But nothing works...

When we try to display a picture on the website 1, we have non picture and this message in the logs:
mod_fcgid: stderr: PHP Warning: is_file(): open_basedir restriction in effect. File(/var/www/vhosts/mydomain2.com/httpdocs//) is not within the allowed path(s): (/var/www/vhosts/mydomain1.com/:/tmp/:/var/www/vhosts/mydomain2.com/httpdocs:/var/www/vhosts/mydomain2.com/httpdocs/:/var/www/vhosts/mydomain2.com/httpdocs//)...

I must be missing something very simple but I don't see... help!

Erwan
 
While open_basedir is set correctly, you might be running into Linux filesystem restrictions.

Plesk folder structure and permissions prevent PHP access between subscriptions/webspaces (/var/www/vhosts/(subscription/webspace name)).

You can do a chmod 711 on /var/www/vhosts/domain2 and on /var/www/vhosts/domain2/httpdocs. However, these permission changes get flagged and reverted by plesk repair fs (with -y option passed to plesk repair you won't notice the permission revert)

If possible, I would move domain2 in the domain1 subscription/webspace. They will share the same system user and see each others files, but I suspect that is not a problem.
 
Thank you Raul.
This is what I realized even if it poses other problems for me. But I haven't found any other solutions.
 
Hey,

What about doing a symlink or Mount?
I have a similar case, will have a Look on the Server later and Post it
 
Symlinks will work only if "Restrict the ability to follow symbolic links" is disabled.

Mounts will also work but you need to make sure mounts are recreated after reboots via /etc/fstab or even autofs.

However, the simplest and most portable way is to have both websites in the same subscription/webspace.
 
Hi,

we have also few sites which have to be in separate subscriptions.

After Boot we have a Script mounting them:

mount --bind /var/www/vhosts/domain-with-content.net/httpdocs/docs /var/www/vhosts/2nd-subscription.com/httpdocs/docs
 
Back
Top