Skip to content

Commit fb41bbf

Browse files
committed
Add the website user to the sshusers group
1 parent 6fb6029 commit fb41bbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ function update($event_name,$data) {
476476
exec("chmod 711 ".escapeshellcmd($data["new"]["document_root"])."/*");
477477
exec("chmod 710 ".escapeshellcmd($data["new"]["document_root"]."/web"));
478478

479+
$command = 'usermod';
480+
$command .= ' --groups sshusers';
481+
$command .= ' '.escapeshellcmd($data["new"]["system_user"]);
482+
exec($command);
483+
479484
//* add the apache user to the client group
480485
$app->system->add_user_to_group($groupname, escapeshellcmd($web_config['user']));
481486

0 commit comments

Comments
 (0)