• 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.

Forwarded to devs PHP breaks for additional domain if the parent subscription is renamed

burnley

Regular Pleskian
TITLE:
PHP breaks for additional domain if the parent subscription is renamed
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
CentOS Linux 7.5.1804 (Core)‬
Product Plesk Onyx Version 17.5.3 Update #47, last updated on May 15, 2018 12:42 PM
PROBLEM DESCRIPTION:
If the subscription is renamed any additional domains part of the subscription will retain the previous php configuration, however since the subscription got renamed the path on the disk is now different and the open_basedir value for the additional domains php handlers becomes invalid​
STEPS TO REPRODUCE:
1. Create new subscription and name it 0dom1.local. Use php-fpm as handler. Test phpinfo, make sure it works.
2. Create an additional domain under 0dom1.local and name it 0dom1-1.local. Use php-fpm as handler. Test phpinfo, make sure it works.
3. Rename the subscription as 0dom1-ren1.local. Wait for the task to complete, then go to the additional domain 0dom1-1.local and test phpinfo again. It'll come up with "Error: Unable to retrieve information about the PHP configuration."
4. Check /var/www/vhosts/system/0dom1-1.local/logs/error_log, you'll see this:
[Tue May 29 12:29:41.385756 2018] [proxy_fcgi:error] [pid 30111:tid 140142503311104] [client 192.168.1.240:48754] AH01071: Got error 'PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/0dom1-ren1.local/0dom1-1.local/__info0.php) is not within the allowed path(s): (/var/www/vhosts/0dom1.local/0dom1-1.local/:/tmp/) in Unknown on line 0\nPHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0\nUnable to open primary script: /var/www/vhosts/0dom1-ren1.local/0dom1-1.local/__info0.php (Operation not permitted)\n'​
ACTUAL RESULT:
php breaks for the additional domains​
EXPECTED RESULT:
After renaming the subscription open_basedir value should be updated for all additional domains and the corresponding php-fpm handlers are reloaded.​
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
From developer:

I was able to reproduce the issue only in conditions if the value "open_basedir" in PHP settings of 0dom1-1.local specified as exact path:

/var/www/vhosts/0dom1.local/0dom1-1.local{/}{:}{TMP}

{/}

In case "open_basedir" value specified using the variable, domain renaming not affect to PHP configuration:

{WEBSPACEROOT}{/}{:}{TMP}{/}

 
Yep, that's exactly right, if using {WEBSPACEROOT}{/}{:}{TMP}{/} everything is fine. However the default setting is {DOCROOT}{/}{:}{TMP}{/}
 
Just thought we should add while {WEBSPACEROOT} side steps the problem it also breaks isolation between the various sites in the subscription. So if one of the sites gets hacked they can run code on the others sites in the subscription - not a good security outcome if you ask me... Rename should work with {DOCROOT}{/}{:}{TMP}{/} so as to allow open_basedir to work properly.
 
Вug PPPM-8653 confirmed.

The issue occurs with {DOCROOT} {/}{:}{TMP}{/}

open_basedir value.
 
Back
Top