diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local
index 4c1d90b33fe69b2f355b7d08a28fe4368145cee4..9cdb54a9ebbfd1bad0afa3791bc45f28bea652a6 100755
--- a/src/freedombone-restore-local
+++ b/src/freedombone-restore-local
@@ -76,17 +76,6 @@ GIT_DOMAIN_NAME=
 WIKI_DOMAIN_NAME=
 FULLBLOG_DOMAIN_NAME=
 
-# after user files have been restored permissions may need to be set
-function set_user_permissions {
-	echo $"Setting permissions"
-	for d in /home/*/ ; do
-		USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
-		if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
-			chown -R $USERNAME:$USERNAME /home/$USERNAME
-		fi
-	done
-}
-
 function check_backup_exists {
 	if [ ! -d $USB_MOUNT/backup ]; then
 		echo $"No backup directory found on the USB drive."
diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup
index 720e13c49f980fddc768ad57a96c9bd3d8b65fc6..2b438f32a8ee93a66728400aaeae2c3c42bba9b2 100755
--- a/src/freedombone-utils-backup
+++ b/src/freedombone-utils-backup
@@ -131,7 +131,7 @@ function backup_mount_drive {
 	if [ $3 ]; then
 		RESTORE_APP=$3
 	fi
-	
+
 	# check that the backup destination is available
 	if [ ! -b $USB_DRIVE ]; then
 		echo $"Please attach a USB drive"
@@ -270,4 +270,15 @@ function backup_database_to_usb {
 	backup_directory_to_usb /root/temp${database_name}data ${database_name}data
 }
 
+# after user files have been restored permissions may need to be set
+function set_user_permissions {
+	echo $"Setting permissions"
+	for d in /home/*/ ; do
+		USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
+		if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
+			chown -R $USERNAME:$USERNAME /home/$USERNAME
+		fi
+	done
+}
+
 # NOTE: deliberately no exit 0