Commit f496e926 authored by Till Brehm's avatar Till Brehm

Fix for amavisd config permissions on CentOS 7.2

parent 775ed6c6
......@@ -33,7 +33,7 @@ class installer_centos extends installer_dist {
protected $clamav_socket = '/tmp/clamd.socket';
public function configure_amavis() {
global $conf;
global $conf, $dist;
// amavisd user config file
$configfile = 'fedora_amavisd_conf';
......@@ -50,6 +50,12 @@ class installer_centos extends installer_dist {
$content = str_replace('/var/spool/amavisd/clamd.sock', $this->clamav_socket, $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// for CentOS 7.2 only
if($dist['confid'] == 'centos72') {
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750);
chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis');
}
// Adding the amavisd commands to the postfix configuration
......
......@@ -480,7 +480,7 @@ class installer_dist extends installer_base {
}
public function configure_amavis() {
global $conf;
global $conf, $dist;
// amavisd user config file
$configfile = 'fedora_amavisd_conf';
......@@ -497,8 +497,7 @@ class installer_dist extends installer_base {
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// for CentOS 7.2 only
$distname = get_distname();
if($distname['confid'] == 'centos72') {
if($dist['confid'] == 'centos72') {
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750);
chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment