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 2nd August 2012, 18:22
wkmpl wkmpl is offline
Junior Member
 
Join Date: Jul 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default ISPConfig 3 in a development scenario

Hi,

ISPConfig really works great and secure on a production webserver.

But we also want to work with ISPConfig on our development server.
And there we will have a network share to /var/www for developer access over samba or afp. So if we run ISPConfig then all client web folder will have there own user and group. But we access the network share with just common user/pass for all developers. -> so we get permission conflicts

How do other developers work in such a scenario?
Could we make ISPConfig insecure for our development and just using a global user:group like www-data but all the comfort of an easy administration with ISPConfig?

Thanks for any response and solution.
Reply With Quote
Sponsored Links
  #2  
Old 3rd August 2012, 09:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,678
Thanks: 819
Thanked 5,318 Times in 4,171 Posts
Default

ISPConfig does not support this, but you should be able to run all websites under www-data with a small hack. Edit the file /usr/local/ispconfig/interface/web/sites/web_domain_edit.php, in line 485 you see these lines:

$system_user = $app->db->quote('web'.$this->id);
$system_group = $app->db->quote('client'.$client_id);

change them to:

$system_user = 'www-data';
$system_group = 'www-data';

and do the same in line 584. This is a hack for a internal dev systemm, so dont use it on servers that were directly connected to the internet. Also these changes will get overwritten on ispconfig update, but this should not be a big problem on a dev server as you wont update ispconfig that frequently there I guess.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 3rd August 2012, 14:23
wkmpl wkmpl is offline
Junior Member
 
Join Date: Jul 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Till,

thanks for your answer.

But this don´t work here, after changing the lines to

$system_user = 'www-data';
$system_group = 'www-data';

the fields in the database will not be updated.
Not for creating a new site, nor updating a site.

So I tried to manually change the fields in the database and after that changing details for the site in the ui to force an update. Now the user/group is www-data for the /var/www/mysite folder, but suddenly ISPConfig is not availiable anymore and i got an permission error? Only if I change the owner/group from ispconfig to www-data for all ispconfig scripts, the frontend comes back again.

Are there any other things to do? Does this work only by patching before ispconfig installation?

I´m using the latest ispconfig version under debian 6 with updated mysql and php (5.3.x) over dotdeb repository.
Reply With Quote
  #4  
Old 3rd August 2012, 14:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,678
Thanks: 819
Thanked 5,318 Times in 4,171 Posts
Default

It should work for all new sites that were created after the change. It should not affect ispconfig interface at all as thes settings are not related to the ispconfig vhost, they affect only hosted sites.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 3rd August 2012, 16:34
wkmpl wkmpl is offline
Junior Member
 
Join Date: Jul 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Till,

even if I change the sql statement directly in web_domain_edit

$sql = "UPDATE web_domain SET system_user = 'www-data', system_group = 'www-data', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$this->id;

$app->db->query($sql);
nothing is changing and the database fields are not updated??

Did a clean install for testing again.
Seems that the sql statements will not be fired?
Reply With Quote
  #6  
Old 3rd August 2012, 16:53
wkmpl wkmpl is offline
Junior Member
 
Join Date: Jul 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Till,

found another occurence in
/usr/local/ispconfig/interface/lib/plugins/sites_web_domain_plugin.inc.php

After changing there, it seems to work.

Are there any files left to be patched?
Reply With Quote
  #7  
Old 3rd August 2012, 16:59
wkmpl wkmpl is offline
Junior Member
 
Join Date: Jul 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

But now again the ISPConfig frontend gives a permission denied.

ps aux | grep apache
root 5092 0.0 0.8 346160 17160 ? Ss 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5095 0.0 0.1 149788 3952 ? S 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5096 0.0 0.4 347080 9756 ? S 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5097 0.0 0.5 347604 10896 ? S 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5098 0.0 0.4 347080 10172 ? S 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5099 0.0 0.5 347448 10640 ? S 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5100 0.0 0.4 346948 9564 ? S 16:30 0:00 /usr/sbin/apache2 -k start
www-data 5137 0.0 0.4 346948 9560 ? S 16:34 0:00 /usr/sbin/apache2 -k start
root 5221 0.0 0.0 7552 864 pts/1 S+ 16:36 0:00 grep apache

After changing to
chown -R www-data:www-data /usr/local/ispconfig
interface is back again.
Reply With Quote
Reply

Bookmarks

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
ISPconfig 3: can't send or receive messages zogthegreat Installation/Configuration 6 22nd May 2010 14:45
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
ISPConfig installation into multiple OpenVZ containers letezo Installation/Configuration 11 3rd March 2009 22:47
ISPConfig 3.0.0.5 Beta Released till General 77 23rd July 2008 12:14
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16


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


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