diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local index e693dbc1..beaa4302 100755 --- a/src/freedombone-restore-local +++ b/src/freedombone-restore-local @@ -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 diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index b7fb85e1..5702201c 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -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