Update v-fix-website-permissions

This commit is contained in:
myvesta 2024-01-08 09:39:24 +01:00 committed by GitHub
commit ecf419cb88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,15 +19,16 @@ source /etc/profile
domain=$1 domain=$1
user=$(/usr/local/vesta/bin/v-search-domain-owner $domain) user=$(/usr/local/vesta/bin/v-search-domain-owner $domain)
USER=$user
# Includes
source /usr/local/vesta/func/main.sh
if [ -z "$user" ]; then if [ -z "$user" ]; then
check_result $E_NOTEXIST "domain $domain doesn't exist" check_result $E_NOTEXIST "domain $domain doesn't exist"
fi fi
USER=$user
# Includes
source /usr/local/vesta/func/main.sh
#----------------------------------------------------------# #----------------------------------------------------------#
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
@ -51,7 +52,7 @@ fi
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Ensure the directory exists and can be changed into # Going to domain directory
cd /home/$USER/web/$domain cd /home/$USER/web/$domain
echo "Updating permissions for /home/$USER/web/$domain/public_html/" echo "Updating permissions for /home/$USER/web/$domain/public_html/"