owncloud config file ownership

This commit is contained in:
Bob Mottram 2016-03-12 13:50:36 +00:00
parent 75d75a6083
commit 760dd7f196
2 changed files with 8 additions and 4 deletions

View File

@ -825,6 +825,7 @@ function restore_owncloud {
return
fi
fi
OWNCLOUD_PATH=/var/www/owncloud
if [ $OWNCLOUD_DOMAIN_NAME ]; then
restore_database owncloud $OWNCLOUD_DOMAIN_NAME
@ -849,11 +850,12 @@ function restore_owncloud {
fi
# re-index the files
chown -R www-data:www-data /var/www/owncloud
chown -R www-data:www-data $OWNCLOUD_PATH
chown root:root $OWNCLOUD_PATH/config/config.php
for d in /home/*/ ; do
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
/var/www/owncloud/occ files:scan $USERNAME
$OWNCLOUD_PATH/occ files:scan $USERNAME
fi
done
fi

View File

@ -699,6 +699,7 @@ function restore_owncloud {
return
fi
fi
OWNCLOUD_PATH=/var/www/owncloud
if grep -q "Owncloud domain" $COMPLETION_FILE; then
OWNCLOUD_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Owncloud domain" | awk -F ':' '{print $2}')
restore_database_from_friend owncloud $OWNCLOUD_DOMAIN_NAME
@ -721,13 +722,14 @@ function restore_owncloud {
rm -rf /root/tempowncloudconfig
fi
chown -R www-data:www-data /var/www/owncloud
chown -R www-data:www-data $OWNCLOUD_PATH
chown root:root $OWNCLOUD_PATH/config/config.php
# re-index files
for d in /home/*/ ; do
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
/var/www/owncloud/occ files:scan $USERNAME
$OWNCLOUD_PATH/occ files:scan $USERNAME
fi
done
fi