From 7ca2f4d1ffec1d4d5a67af10ba9ba7e200cf4649 Mon Sep 17 00:00:00 2001 From: dachris1 Date: Mon, 7 Aug 2023 16:06:43 +0200 Subject: [PATCH] install/dist/lib/gentoo.lib.php there are some parts where a user is added to a group with "adduser" command. changed "adduser" to "usermod -a -G" since there is no "adduser" in gentoo. --- install/dist/lib/gentoo.lib.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 8c942f2491..ef660d950d 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -942,7 +942,8 @@ class installer extends installer_base caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } - $command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; + //$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; + $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ @@ -1002,7 +1003,8 @@ class installer extends installer_base if(!is_user($apps_vhost_user)) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group; + //$command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group; + $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ @@ -1362,18 +1364,18 @@ class installer extends installer_base // and must be fixed as this will allow the apache user to read the ispconfig files. // Later this must run as own apache server or via suexec! if($conf['apache']['installed'] == true){ - $command = 'adduser '.$conf['apache']['user'].' ispconfig'; + $command = 'usermod -a -G ispconfig '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(is_group('ispapps')){ - $command = 'adduser '.$conf['apache']['user'].' ispapps'; + $command = 'usermod -a -G ispapps '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } } if($conf['nginx']['installed'] == true){ - $command = 'adduser '.$conf['nginx']['user'].' ispconfig'; + $command = 'usermod -a -G ispconfig '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(is_group('ispapps')){ - $command = 'adduser '.$conf['nginx']['user'].' ispapps'; + $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } } @@ -1597,3 +1599,4 @@ class installer extends installer_base } ?> + -- GitLab