From b7e9ce60f7f55c2b84db9a40f04bad7066adb515 Mon Sep 17 00:00:00 2001 From: mrflos Date: Fri, 3 Feb 2023 22:17:25 +0300 Subject: [PATCH] fix(install) : make it as sudo --- utils.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.inc.php b/utils.inc.php index 12391ce..9c2e012 100644 --- a/utils.inc.php +++ b/utils.inc.php @@ -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)