HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   ISPConfig + open_basedir restriction in effect (

010101 20th April 2011 01:26

ISPConfig + open_basedir restriction in effect
I've been trying to solve this problem for about 2 hours and I don't think I'll understand how to do it on my own.

I've built this debian system following one of the ISPConfig guides here on howtoforge and I've been using it for other stuff for one month or so, but never hosted a site on this server so far.

I've tried installing Drupal and Wordpress, but with both I'm getting the same error. (open_basedir)

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/clients/client1/web3/wp-config.php) is not within the allowed path(s):
in /var/www/clients/client1/web3/web/wp-load.php on line 32

I've uploaded all the files into /var/www/clients/client1/web3/web/

Could somebody please give me some input? what's wrong?

till 20th April 2011 10:21

Please post the output of:

ls -la /var/www/clients/client1/web3/web/

010101 20th April 2011 10:30

here it is:

ls -la /var/www/clients/client1/web3/web/
total 240
drwx--x--- 7 web3 client0  4096 Apr 19 23:54 .
drwxr-x--x 9 web3 client1  4096 Apr 19 19:11 ..
drwxr-xr-x 2 root root    4096 Apr 19 23:54 error
-rw-r--r-- 1 web3 client1  397 Apr 19 23:41 index.php
-rw-r--r-- 1 web3 client1 15606 Apr 19 23:41 license.txt
-rw-r--r-- 1 web3 client1  9202 Apr 19 23:41 readme.html
drwxr-xr-x 2 root root    4096 Apr 20 00:30 stats
-rw-r--r-- 1 web3 client1  4337 Apr 19 23:41 wp-activate.php
drwxr-xr-x 9 web3 client1  4096 Apr 19 23:43 wp-admin
-rw-r--r-- 1 web3 client1 40283 Apr 19 23:41 wp-app.php
-rw-r--r-- 1 web3 client1  226 Apr 19 23:41 wp-atom.php
-rw-r--r-- 1 web3 client1  274 Apr 19 23:41 wp-blog-header.php
-rw-r--r-- 1 web3 client1  3931 Apr 19 23:41 wp-comments-post.php
-rw-r--r-- 1 web3 client1  244 Apr 19 23:41 wp-commentsrss2.php
-rw-r--r-- 1 web3 client1  3177 Apr 19 23:41 wp-config-sample.php
drwxr-xr-x 4 web3 client1  4096 Apr 19 23:43 wp-content
-rw-r--r-- 1 web3 client1  1255 Apr 19 23:41 wp-cron.php
-rw-r--r-- 1 web3 client1  246 Apr 19 23:41 wp-feed.php
drwxr-xr-x 8 web3 client1  4096 Apr 19 23:45 wp-includes
-rw-r--r-- 1 web3 client1  1997 Apr 19 23:41 wp-links-opml.php
-rw-r--r-- 1 web3 client1  2453 Apr 19 23:41 wp-load.php
-rw-r--r-- 1 web3 client1 27787 Apr 19 23:41 wp-login.php
-rw-r--r-- 1 web3 client1  7774 Apr 19 23:41 wp-mail.php
-rw-r--r-- 1 web3 client1  494 Apr 19 23:41 wp-pass.php
-rw-r--r-- 1 web3 client1  224 Apr 19 23:41 wp-rdf.php
-rw-r--r-- 1 web3 client1  334 Apr 19 23:41 wp-register.php
-rw-r--r-- 1 web3 client1  224 Apr 19 23:41 wp-rss.php
-rw-r--r-- 1 web3 client1  226 Apr 19 23:41 wp-rss2.php
-rw-r--r-- 1 web3 client1  9655 Apr 19 23:41 wp-settings.php
-rw-r--r-- 1 web3 client1 18644 Apr 19 23:41 wp-signup.php
-rw-r--r-- 1 web3 client1  3702 Apr 19 23:41 wp-trackback.php
-rw-r--r-- 1 web3 client1  3210 Apr 19 23:41 xmlrpc.php

till 20th April 2011 10:39

Thats ok so far, wordpress is just not fully installed yet. The next step to install wordpress are:

1) Make a copy of the file wp-config-sample.php and name it wp-config.php
2) Edit the file wp-config.php and change the database login details inside so that they match the database name, user and password of your database.

Then open the wordpress installer in the webbrowser and follow the instructions in the installer.

As a sidenote: Ensure that you use the correct PHP method. For CMS systems you should use "PHP-FCGI" and the suexec checkbox must be enabled.

010101 20th April 2011 12:44

thank you till ;)

the weird thing is that, if you don't have a wp-config.php file, it is usually created during the installation process, instead this is throwing that error in the page where the installation begins.

Sure the method you mentioned would make it work in a fingersnap, but I'm more interested in getting the server configured as it should rather than in a quick fix.

The website has suexec enabled and php set to fastcgi

If I understand correctly I should do one of the following:

- disable open_basedir (how? can it be done from within ISPConfig?)
- properly configure open_basedir paths in order for it not to throw the error
no clue how to do it, the current settings are:
website options: /var/www/clients/client1/web3/web:/var/www/clients/client1/web3/tmp:/var/www/
server config: [website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin

till 20th April 2011 13:15

The problem is misbehaviour in wordpress and not a wrong setting in ispconfig. If wordpress does not find its config file, it tries to traverse the path downwards and tries to find the file wp-config.php in other locations. So wordpress tries to open folders that it is not allowed too because they are outside of its web directory and this triggers the open_basedir.

You can disable open_baesdir of course by simply setting / as open_basdir path, but thst quite insecure as it allows all your website users to read the mysql passwords and other data of other websites.

Julian 28th January 2014 13:22


I have the same issue! I have ISPConfig Version:

and I have this error:
Warning: Unknown: open_basedir restriction in effect. File(/var/www/clients/client1/web32/web/index.html) is not within the allowed path(s): (/usr/share/php:/usr/lib/roundcube:/etc/roundcube:/usr/share/roundcube:/var/lib/roundcube:/var/log/roundcube) in Unknown on line 0 Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

In /etc/apache2/sites-available/ I dont have the open_basedir!
If I add it then the roundcube dosn't work anymore!!!

[Tue Jan 28 13:16:40 2014] [error] [client xx.xx.xx.xx] PHP Warning: is_file(): open_basedir restriction in effect. File(/var/lib/roundcube/config/ is not within the allowed path(s): (/var/www/clients/client1/web21/web:/var/www/clients/client1/web21/tmp:/var/www/ in /usr/share/roundcube/program/include/rcube_config.php on line 137

Can some one help me please!?

till 28th January 2014 13:30

you must have modified the open_basedir settings in the website or the glovbl setting in ispconfig, as all website paths are mising that ispconfig adds by default.

to fix this for this site, add:


at the end of the open_basedir field of the website. and do not odify any vhost or php config files of the site manually, this will just break your setup!

Julian 28th January 2014 13:42

Thank you till for your replay!

Can you please tell me where to add the:

Because in ispconfig/website/option at the PHP open_basedir, I already have that!

Julian 28th January 2014 16:43

Can you please tell me where the open_basedir is set? I can't find it and some websites dost work!

If I dont need to change the vhost manually then where to edit?

Please help me!

All times are GMT +2. The time now is 04:23.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.