• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question open_basedir dont work ?

Woozy

New Pleskian
Hello everybody.
I have 2 domain. aaa.com and ccc.com.
i host the php script myscript.php into the domain ccc.com.

/var/www/vhosts/ccc.com/httpdocs/myscript.php

The script needs to have access to the /var/www/vhosts/aaa.com/httpdocs/includes/ directory.

I configure the open_basedir for the ccc.com domain :
/var/{:}{TMP}{/}:/var/www/vhosts/aaa.com/httpdocs/includes/

I try and (php code) :
file_exists('/var/www/vhosts/aaa.com/httpdocs/includes/test.txt');

this function return false (file dont exist)... but /var/www/vhosts/aaa.com/httpdocs/includes/test.txt exist.

Other test:

fopen('/var/www/vhosts/aaa.com/httpdocs/includes/test.txt', 'r+')

return : Warning: fopen(/var/www/vhosts/aaa.com/httpdocs/includes/test.txt): failed to open stream: Permission denied in /var/www/vhosts/ccc.com/httpdocs/myscript.php on line 216

Why?, my open_basedir is correctly configured, no ?

thx for your help.
 
Back
Top