@@ -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