fix(install) : make it as sudo

This commit is contained in:
mrflos 2023-02-03 22:17:25 +03:00
parent c8b6f72be4
commit b7e9ce60f7

View file

@ -150,7 +150,7 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
throw new Exception('You need an username AND a password to add a herse.');
} else {
// add password file to domain
exec('mkdir -p /home'.'/'.$user.'/'.$domain);
exec('sudo -u '.$user.' mkdir -p /home'.'/'.$user.'/'.$domain);
file_put_contents(
'/home'.'/'.$user.'/'.$domain.'/.htpasswd',
$herseUser.':'.password_hash($hersePass, PASSWORD_BCRYPT)