HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Web Site ownership (http://www.howtoforge.com/forums/showthread.php?t=33347)

Doug_M 6th April 2009 20:47

[SOLVED] Web Site ownership
 
Hi,

I'm using ISPConfig on a private network with no clients. I want it to create all web sites with owner/group of apache/apache. What file do I need to modify in order to accomplish this?

Thanks,
Doug

till 7th April 2009 09:44

You will have to change the apache plugin in /usr/local/ispconfig/server/plugins-enabled. But this will be a lot of work without any real benefits as you can use e.g. php as fcgi to run php scripts under the user of the site.

Doug_M 7th April 2009 15:31

Thanks Till, I'd never used FastCGI before. So far so good.

Regards,
Doug

Doug_M 7th April 2009 20:38

For those of you interested in modifying the apache plugin here you go:

Code:

vi /usr/local/ispconfig/server/plugins-enabled/apache2_plugin.inc.php
Around line 198 added groupname variable like so:
Code:

function update($event_name,$data) {
    global $app, $conf;
      $groupname = "apache";

Around line 403 commented out groupname and added my own like so:
Code:

//$groupname = escapeshellcmd($data["new"]["system_group"]);
 $groupname = "apache";

Around line 430 added a chmod to make group writeable:
Code:

exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"]));
exec("chmod -R ug+w ".escapeshellcmd($data["new"]["document_root"]));



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

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