• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

open_basedir restriction

AndreasS123

New Pleskian
Hi,

when uploading and copying a file in another web on the same server I get the following error:

Warning: copy(): open_basedir restriction in effect. File(/var/www/vhosts/abc.com/news/upload/1700_doc_1383574204.pdf) is not within the allowed path(s): (/tmp:/var/tmp:/var/www/phplib-7.4a:/var/www/vhosts/xyz.com/cms:/var/www/vhosts/abc.com/news/upload) in /var/www/vhosts/xyz.com/cms/funktionen/upload.php on line 207 Warning: copy(/var/www/vhosts/abc.com/news/upload/1700_doc_1383574204.pdf): failed to open stream: Operation not permitted in /var/www/vhosts/xyz.com/cms/funktionen/upload.php on line 207

This although the directory is defined in open_basedir.

I'm using Plesk 11.5.30 on CentOS.

Any ideas??

Andi
 
There are many KB articles which can be found with "open_basedir restriction in effect". Have you tried to read them before posting?
 
Well, I'm running an application within a subdomain of xyz.com.
Actually I had a vhost.conf. When upgrading to Panel 11.5.30 the vhost.conf did't work at all.
Instructions on this problem do not work, some even speak against each other.
So I used the open_basedir in the Panel's php-settings of the domain.

The path to /var/www/phplib-7.4a now works, the path to /var/www/vhosts/abc.com/news/upload
doesn't. For me it seems to be a bug in Plesk ???

I don't know what I can do any more right now. :-(
 
What is your setting for open_basedir custom value now?
It should be something like:

{WEBSPACEROOT}/:{TMP}/:/var/www/vhosts/abc.com/news/upload/
 
Hello Igor,

my setting for the open_basedir custom value is

{WEBSPACEROOT}/:{TMP}/:/var/tmp/:/var/www/phplib-7.4a:/var/www/vhosts/xyz.com/cms/:/var/www/vhosts/abc.com/news/upload/

I even tried this with and without ending / of each part.

Could it stand in connection with user rights of the directory /var/www/vhosts/abc.com/news/upload/? The user rights are 777 on this
directory.
 
Back
Top