From 63ce187ffb230328bbd3e797c9d7d34b7584f4c8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 31 Oct 2012 04:49:56 -0400
Subject: [PATCH] Fixed: FS#2512 - ISPConfig 3.0.4.6 cron log
---
install/lib/installer_base.lib.php | 46 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1933db8..65cafa9 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -423,7 +423,7 @@
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
}
- $query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`) ON ".$value['db'].".`web_domain` TO '".$value['user']."'@'".$host."' ";
+ $query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ".$value['db'].".`web_domain` TO '".$value['user']."'@'".$host."' ";
if ($verbose){
echo $query ."\n";
}
@@ -472,6 +472,14 @@
}
$query = "GRANT SELECT, UPDATE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' ";
+ if ($verbose){
+ echo $query ."\n";
+ }
+ if(!$this->dbmaster->query($query)) {
+ $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
+ }
+
+ $query = "GRANT SELECT, INSERT, DELETE ON ".$value['db'].".`web_backup` TO '".$value['user']."'@'".$host."' ";
if ($verbose){
echo $query ."\n";
}
@@ -900,7 +908,7 @@
$content = rf($conf['postfix']['config_dir'].'/master.cf');
// Only add the content if we had not addded it before
if(!stristr($content,'dovecot/deliver')) {
- $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
+ $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
af($conf['postfix']['config_dir'].'/master.cf',$deliver_content);
}
unset($content);
@@ -1555,6 +1563,16 @@
//$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
+
+ if(file_exists('/var/run/php5-fpm.sock')){
+ $use_tcp = '#';
+ $use_socket = '';
+ } else {
+ $use_tcp = '';
+ $use_socket = '#';
+ }
+ $content = str_replace('{use_tcp}', $use_tcp, $content);
+ $content = str_replace('{use_socket}', $use_socket, $content);
wf($vhost_conf_dir.'/apps.vhost', $content);
@@ -1650,6 +1668,7 @@
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
$content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content);
+ $content = str_replace('{theme}', $conf['theme'], $content);
wf($install_dir.'/interface/lib/'.$configfile, $content);
@@ -1673,6 +1692,7 @@
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
$content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content);
+ $content = str_replace('{theme}', $conf['theme'], $content);
wf($install_dir.'/server/lib/'.$configfile, $content);
@@ -1796,9 +1816,14 @@
exec("chmod -R 770 $install_dir/server/aps_packages");
//* make sure that the server config file (not the interface one) is only readable by the root user
- chmod($install_dir.'/server/lib/'.$configfile, 0600);
- chown($install_dir.'/server/lib/'.$configfile, 'root');
- chgrp($install_dir.'/server/lib/'.$configfile, 'root');
+ chmod($install_dir.'/server/lib/config.inc.php', 0600);
+ chown($install_dir.'/server/lib/config.inc.php', 'root');
+ chgrp($install_dir.'/server/lib/config.inc.php', 'root');
+
+ //* Make sure thet the interface config file is readable by user ispconfig only
+ chmod($install_dir.'/interface/lib/config.inc.php', 0600);
+ chown($install_dir.'/interface/lib/config.inc.php', 'ispconfig');
+ chgrp($install_dir.'/interface/lib/config.inc.php', 'ispconfig');
chmod($install_dir.'/server/lib/remote_action.inc.php', 0600);
chown($install_dir.'/server/lib/remote_action.inc.php', 'root');
@@ -1957,10 +1982,12 @@
touch($conf['ispconfig_log_dir'].'/ispconfig.log');
}
- //* Create the ispconfig auth log file
+ //* Create the ispconfig auth log file and set uid/gid
if(!is_file($conf['ispconfig_log_dir'].'/auth.log')) {
- touch($conf['ispconfig_log_dir'].'/auth.log', 0666);
+ touch($conf['ispconfig_log_dir'].'/auth.log');
}
+ exec('chown ispconfig:ispconfig '. $conf['ispconfig_log_dir'].'/auth.log');
+ exec('chmod 660 '. $conf['ispconfig_log_dir'].'/auth.log');
if(is_user('getmail')) {
rename($install_dir.'/server/scripts/run-getmail.sh','/usr/local/bin/run-getmail.sh');
@@ -1991,6 +2018,11 @@
fclose($fh);
*/
}
+
+ //* Remove Domain module as its functions are available in the client module now
+ if(@is_dir('/usr/local/ispconfig/interface/web/domain')) exec('rm -rf /usr/local/ispconfig/interface/web/domain');
+
+
}
public function configure_dbserver() {
--
Gitblit v1.9.1