mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 12:36:23 -07:00
$SKIP_OWNERSHIP_CHECK in v-fix-website-permissions, v-fix-wordpress-core
This commit is contained in:
parent
09465e5fba
commit
f77f8e8b78
2 changed files with 4 additions and 4 deletions
|
@ -59,7 +59,7 @@ fi
|
|||
cd /home/$USER/web/$domain
|
||||
|
||||
# Ownership check
|
||||
if [ -f "public_html/index.php" ]; then
|
||||
if [ -z "$SKIP_OWNERSHIP_CHECK" ] && [ -f "public_html/index.php" ]; then
|
||||
owner=$(stat -c '%U' "public_html/index.php")
|
||||
if [ "$owner" = "root" ] || [ "$owner" = "www-data" ]; then
|
||||
echo "Skipping permission fix for $domain, because v-lock-wordpress is used (index.php is owned by $owner)"
|
||||
|
|
|
@ -84,7 +84,7 @@ for f in "$SITE_PATH"/*.php; do
|
|||
mv "$f" "$BACKUP_DIR/"
|
||||
done
|
||||
|
||||
chown -R www-data:www-data "$BACKUP_DIR"
|
||||
# chown -R www-data:www-data "$BACKUP_DIR"
|
||||
check_result $? "backup failed" > /dev/null
|
||||
echo "Old core folders moved to $BACKUP_DIR"
|
||||
|
||||
|
@ -100,8 +100,8 @@ for corephp in "$CACHE_PATH"/*.php; do
|
|||
done
|
||||
|
||||
# fix permissions
|
||||
/usr/local/vesta/bin/v-fix-website-permissions $DOMAIN
|
||||
chown -R www-data:www-data "$BACKUP_DIR"
|
||||
SKIP_OWNERSHIP_CHECK=1 /usr/local/vesta/bin/v-fix-website-permissions $DOMAIN
|
||||
# chown -R www-data:www-data "$BACKUP_DIR"
|
||||
|
||||
echo "Done, core WP files, wp-admin and wp-includes replaced for $DOMAIN"
|
||||
exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue