permissions on htpasswd file

This commit is contained in:
Serghey Rodin 2015-07-13 23:20:36 +03:00
commit edcd549e4c
3 changed files with 48 additions and 14 deletions

View file

@ -74,6 +74,7 @@ fi
# Adding httpasswd user
auth_hash=$($BIN/v-generate-password-hash htpasswd htpasswd $password)
touch $htpasswd
chmod 640 $htpasswd $htaccess
sed -i "/^$auth_user:/d" $htpasswd
echo "$auth_user:$auth_hash" >> $htpasswd