Skip to content

Commit 774d770

Browse files
author
Till Brehm
committed
Merge branch 'master' into 'develop'
change adduser to usermod -a -G in install/dist/lib/gentoo.lib.php See merge request ispconfig/ispconfig3!1787
2 parents dab6683 + 7ca2f4d commit 774d770

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

install/dist/lib/gentoo.lib.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,8 @@ public function configure_apps_vhost()
942942
caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
943943
}
944944

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

948949
if(!@is_dir($install_dir)){
@@ -1002,7 +1003,8 @@ public function configure_apps_vhost()
10021003
if(!is_user($apps_vhost_user)) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10031004

10041005

1005-
$command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group;
1006+
//$command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group;
1007+
$command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['nginx']['user'];
10061008
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10071009

10081010
if(!@is_dir($install_dir)){
@@ -1362,18 +1364,18 @@ public function install_ispconfig() {
13621364
// and must be fixed as this will allow the apache user to read the ispconfig files.
13631365
// Later this must run as own apache server or via suexec!
13641366
if($conf['apache']['installed'] == true){
1365-
$command = 'adduser '.$conf['apache']['user'].' ispconfig';
1367+
$command = 'usermod -a -G ispconfig '.$conf['apache']['user'];
13661368
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
13671369
if(is_group('ispapps')){
1368-
$command = 'adduser '.$conf['apache']['user'].' ispapps';
1370+
$command = 'usermod -a -G ispapps '.$conf['apache']['user'];
13691371
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
13701372
}
13711373
}
13721374
if($conf['nginx']['installed'] == true){
1373-
$command = 'adduser '.$conf['nginx']['user'].' ispconfig';
1375+
$command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
13741376
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
13751377
if(is_group('ispapps')){
1376-
$command = 'adduser '.$conf['nginx']['user'].' ispapps';
1378+
$command = 'usermod -a -G ispapps '.$conf['nginx']['user'];
13771379
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
13781380
}
13791381
}
@@ -1597,3 +1599,4 @@ public function install_ispconfig() {
15971599
}
15981600

15991601
?>
1602+

0 commit comments

Comments
 (0)