QRecallDownloadIdentity KeysForumsSupport
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
Restoring files when the user's UID number has changed?  XML
Forum Index » Problems and Bugs
Author Message
Steven J Gold



Joined: 30-Jul-15 11:45
Messages: 22
Offline

I did a "Nuke and Pave" on my computer while upgrading to High Sierra to rid myself of over 10 years of accumulated crud and junk files which I did not want carried over to a new installation.

Prior to erasing the disc, I did a backup (actually, several backups ) and my intent was to use QRecall to restore the particular apps and data I wanted from the prior system to the new one.

But I'm running into a problem: on my new clean virgin system my ID (sjg) has a different UID number (501) then on the prior system I backed up (503). Apparently QRecall restores the old files using the UID number to set ownership instead of the name so I ended up not owning the files which I previously owned!

This is not easily rectifiable from the Finder since I am not the owner of the files.

Is there a way to restore files from a backup, using the owners name to set ownership instead of the UID?
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1548
Online

Sorry about that. QRecall is (currently) a bit literal about UIDs and GIDs.

(An earlier version used to capture and lookup the UIDs based on the current account info, but there were other problems with that. I'll make a note to try and resurrect that option in a future version.)

The workaround is to just recall all of the files belonging to sjg (which will belong to 503), then simply change the ownership of all of your files back to 501 (the new and improved sjg). Here's how:

I would first create an second admin account for this. It will be *much* easier to do if you're not logged in as sjg at the same time. Log out of sjg and log into the new admin account. (I keep an admin account named "Maintenance" around just for silliness like this.)

Alternative: If you've already recalled these file and have them sitting somewhere, skip the new account setup and jump to the terminal stuff.

Use QRecall to restore your sjg home folder. This will overwrite your new sjg home folder with the captured version. At this point sjg is useless as all of the files belong to 503 and sjg is 501, so you can't even log it at this point.

Open a Terminal window and issue this command:

The terminal will prompt you for the admin account's password. After sudo -s returns, you'll be running a shell with root privileges. Now run these commands:

These command will find every file and directory in /Users/sjg and pass it to the chown command, which will change the ownership of the file/dir to 501. The second command does the same with the group ownership. These may take awhile to run, depending on how many files you have.

When these commands finish, everything owned by 503 in /Users/sjg will now be owned by 501. Issue the exit command in the terminal, log out, and back into your home account.

Note: you might have other files, outside of your home folder, that still belong to 503. You'll just have to deal with those on an ad hoc basis, but these commands can be reused with any directory, just change the path of the find command to whatever directory you want to fix.


- QRecall Development -
[Email]
 
Forum Index » Problems and Bugs
Go to:   
Powered by JForum 2.1.8 © JForum Team