Browse Source

Fix restore user with custom content in home dir

Rearranged the order of execution to fix the error occurring when restoring a user with custom content in home dir.
ifaist0s 5 years ago
parent
commit
da70072076
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-restore-user

+ 1 - 1
bin/v-restore-user

@@ -778,8 +778,8 @@ if [ "$udir" != 'no' ]; then
 
             chown "$user" "$tmpdir/user_dir"
             chown "$user" "$HOMEDIR/$user"
-            chown "$user" "$HOMEDIR/$user/$user_dir"
             $BIN/v-extract-fs-archive "$user" "$tmpdir/user_dir/$user_dir.tar.gz" "$HOMEDIR/$user"
+            chown "$user" "$HOMEDIR/$user/$user_dir"
             cmdstatus="$?"
             chown root:root "$HOMEDIR/$user"
             if [ "$cmdstatus" -ne 0 ]; then