File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -476,27 +476,14 @@ 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- //* Change the home directory and group of the website user
480- $ command = 'usermod ' ;
481- $ command .= ' --groups sshusers, ' .escapeshellcmd ($ web_config ['group ' ]);
482- $ command .= ' ' .escapeshellcmd ($ data ["new " ]["system_user " ]);
483- exec ($ command );
484- $ app ->log ("Modifying user: $ command " ,LOGLEVEL_DEBUG );
485-
486- // make temp direcory writable for the apache user and the website user
487- // exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
479+ //* add the apache user to the client group
480+ $ app ->system ->add_user_to_group ($ groupname , escapeshellcmd ($ web_config ['user ' ]));
481+
488482 // If the security Level is set to medium
489483 } else {
490484
491485 exec ("chmod 755 " .escapeshellcmd ($ data ["new " ]["document_root " ]."/ " ));
492486 exec ("chmod 755 " .escapeshellcmd ($ data ["new " ]["document_root " ]."/* " ));
493-
494- //* Change the home directory and group of the website user
495- $ command = 'usermod ' ;
496- $ command .= ' --groups sshusers ' ;
497- $ command .= ' ' .escapeshellcmd ($ data ["new " ]["system_user " ]);
498- exec ($ command );
499- $ app ->log ("Modifying user: $ command " ,LOGLEVEL_DEBUG );
500487
501488 // make temp direcory writable for the apache user and the website user
502489 exec ("chmod 777 " .escapeshellcmd ($ data ["new " ]["document_root " ]."/tmp " ));
You can’t perform that action at this time.
0 commit comments