From ea03be36772246d04fc194d9c0a1b992ea093993 Mon Sep 17 00:00:00 2001 From: Ramael Metatron Date: Sun, 16 Oct 2016 15:15:55 -0500 Subject: [PATCH] fix permissions error, create secure config fix group permission error by assigning to user. copy config files to s config template. --- bin/v-add-web-domain-httpauth | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/v-add-web-domain-httpauth b/bin/v-add-web-domain-httpauth index 42dd269e0..67d907c14 100755 --- a/bin/v-add-web-domain-httpauth +++ b/bin/v-add-web-domain-httpauth @@ -71,9 +71,13 @@ fi auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password) touch $htpasswd chmod 640 $htpasswd $htaccess +chgrp $user $htpasswd $htaccess sed -i "/^$auth_user:/d" $htpasswd echo "$auth_user:$auth_hash" >> $htpasswd +cp -p "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess" "$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess" +cp -p "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd" "$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd" + # Restarting web server if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then $BIN/v-restart-web