diff --git a/web/app/Actions/CreateLinuxWebUser.php b/web/app/Actions/CreateLinuxWebUser.php index 1f5667cd..d6a94747 100644 --- a/web/app/Actions/CreateLinuxWebUser.php +++ b/web/app/Actions/CreateLinuxWebUser.php @@ -29,16 +29,16 @@ public function handle() $username = $this->username; $password = $this->password; - $command = 'adduser --disabled-password --gecos "" "'.$username.'"'; + $command = 'sudo adduser --disabled-password --gecos "" "'.$username.'"'; $output .= shell_exec($command); - $command = 'usermod -a -G www-data '.$username; + $command = 'sudo usermod -a -G www-data '.$username; $output .= shell_exec($command); - $command = 'echo '.$username.':'.$password.' | chpasswd -e'; + $command = 'sudo echo '.$username.':'.$password.' | chpasswd -e'; $output .= shell_exec($command); - $command = 'chmod 711 /home/'.$username; + $command = 'sudo chmod 711 /home/'.$username; $output .= shell_exec($command); return $output; diff --git a/web/app/Installers/Server/Applications/DovecotInstaller.php b/web/app/Installers/Server/Applications/DovecotInstaller.php index 6306e295..6f74de27 100644 --- a/web/app/Installers/Server/Applications/DovecotInstaller.php +++ b/web/app/Installers/Server/Applications/DovecotInstaller.php @@ -15,11 +15,16 @@ public function setLogFilePath($path) public function install() { - $commands = []; $commands[] = 'echo "Installing dovecot..."'; $commands[] = 'apt-get install -y telnet dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd'; + + + // /var/lib/roundcube + // wget https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz + // $commands[] = 'apt-get install -y roundcube roundcube-core roundcube-mysql roundcube-plugins'; + $shellFileContent = ''; foreach ($commands as $command) { $shellFileContent .= $command . PHP_EOL; diff --git a/web/app/Models/HostingSubscription.php b/web/app/Models/HostingSubscription.php index 8e67a53b..bc5bb559 100644 --- a/web/app/Models/HostingSubscription.php +++ b/web/app/Models/HostingSubscription.php @@ -110,7 +110,7 @@ private function _createLinuxWebUser($model): array $createLinuxWebUser = new CreateLinuxWebUser(); $createLinuxWebUser->setUsername($systemUsername); $createLinuxWebUser->setPassword($systemPassword); - $createLinuxWebUserOutput = $createLinuxWebUser->handle(); + $createLinuxWebUserOutput = $createLinuxWebUser->handle(); if (strpos($createLinuxWebUserOutput, 'Creating home directory') !== false) {