Skip to content

Commit 5edf400

Browse files
author
Till Brehm
committed
Fixed: FS#3314 - User/group modification fsails on OpenSUSE 12.x
1 parent 08b5daa commit 5edf400

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

install/dist/lib/opensuse.lib.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,9 @@ public function configure_amavis() {
529529
unset($content);
530530

531531
// Add the clamav user to the vscan group
532-
exec('groupmod --add-user clamav vscan');
532+
//exec('groupmod --add-user clamav vscan');
533+
$command = 'usermod -a -G clamav vscan';
534+
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
533535

534536

535537
}
@@ -1051,18 +1053,22 @@ public function install_ispconfig()
10511053
// and must be fixed as this will allow the apache user to read the ispconfig files.
10521054
// Later this must run as own apache server or via suexec!
10531055
if($conf['apache']['installed'] == true){
1054-
$command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig';
1056+
//$command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig';
1057+
$command = 'usermod -a -G ispconfig '.$conf['apache']['user'];
10551058
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10561059
if(is_group('ispapps')){
1057-
$command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps';
1060+
//$command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps';
1061+
$command = 'usermod -a -G ispapps '.$conf['apache']['user'];
10581062
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10591063
}
10601064
}
10611065
if($conf['nginx']['installed'] == true){
1062-
$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig';
1066+
//$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig';
1067+
$command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
10631068
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10641069
if(is_group('ispapps')){
1065-
$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps';
1070+
//$command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps';
1071+
$command = 'usermod -a -G ispapps '.$conf['nginx']['user'];
10661072
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10671073
}
10681074
}

install/lib/installer_base.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,8 @@ public function configure_apps_vhost() {
14951495
if(!is_user($apps_vhost_user)) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
14961496

14971497

1498-
$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group;
1498+
//$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group;
1499+
$command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['apache']['user'];
14991500
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
15001501

15011502
if(!@is_dir($install_dir)){

0 commit comments

Comments
 (0)