Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th April 2011, 00:26
010101 010101 is offline
Junior Member
 
Join Date: Mar 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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):
(/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/tmp:
/var/www/domain.net/web:/srv/www/domain.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin)
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?
Reply With Quote
Sponsored Links
  #2  
Old 20th April 2011, 09:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Please post the output of:

ls -la /var/www/clients/client1/web3/web/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 20th April 2011, 09:30
010101 010101 is offline
Junior Member
 
Join Date: Mar 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here it is:
Code:
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
Reply With Quote
  #4  
Old 20th April 2011, 09:39
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 20th April 2011, 11:44
010101 010101 is offline
Junior Member
 
Join Date: Mar 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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/impiantivideosorveglianza.net/web:/srv/www/impiantivideosorveglianza.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
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
Reply With Quote
  #6  
Old 20th April 2011, 12:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 28th January 2014, 12:22
Julian Julian is offline
Junior Member
 
Join Date: Dec 2011
Posts: 24
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hello,

I have the same issue! I have ISPConfig Version: 3.0.5.3

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/xxxxxx.xxx/web/index.html' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

In /etc/apache2/sites-available/website.com.vhost 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/main.inc.php) is not within the allowed path(s): (/var/www/clients/client1/web21/web:/var/www/clients/client1/web21/tmp:/var/www/xxxxx.xxx/web:/srv/www/xxxxxxxx.xxx/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/roundcube:/usr/share/php) in /usr/share/roundcube/program/include/rcube_config.php on line 137


Can some one help me please!?
__________________
Iulian HALAC

Last edited by Julian; 29th January 2014 at 17:23.
Reply With Quote
  #8  
Old 28th January 2014, 12:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

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:

:/var/www/clients/client1/web32/web

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!
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 28th January 2014, 12:42
Julian Julian is offline
Junior Member
 
Join Date: Dec 2011
Posts: 24
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thank you till for your replay!

Can you please tell me where to add the:
:/var/www/clients/client1/web32/web
???

Because in ispconfig/website/option at the PHP open_basedir, I already have that!
__________________
Iulian HALAC
Reply With Quote
  #10  
Old 28th January 2014, 15:43
Julian Julian is offline
Junior Member
 
Join Date: Dec 2011
Posts: 24
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

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!
__________________
Iulian HALAC
Reply With Quote
Reply

Bookmarks

Tags
ispconfig, open_basedir

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Version 1.3 of the ISPConfig 3 Manual is finally available! falko General 44 2nd December 2011 12:04
use jawstats / mawstats with ispconfig e100 Tips/Tricks/Mods 3 19th December 2010 11:33
ISPConfig 3.0.0.4 Beta Released till General 54 4th March 2009 09:55
ISPConfig installation into multiple OpenVZ containers letezo Installation/Configuration 11 3rd March 2009 22:47
KeepAliveTimeout - no effect through ISPConfig ISPConfigFan General 2 25th May 2007 13:40


All times are GMT +2. The time now is 20:30.


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