mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
fix permissions error, create secure config
fix group permission error by assigning to user. copy config files to s config template.
This commit is contained in:
parent
f1623c9bd9
commit
ea03be3677
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue