MacOS – How to copy files off a failed system partition without encountering permissions problems

disk-utilityfilemacospermission

So I'm about to copy files off a system partition, and I'm afraid I'll have problems with permissions.

A bit of background – OS X won't boot (looping progress bar) and Mavericks Recovery's Disk Utility says it can't repair it. Files are viewable in MacDrive on the Boot Camp partition (which I'm using, so I don't think the disk has failed, just something wrong with that particular partition).

My plan is to remove the drive and mount it on another Mac and see what I can copy.

Thing is I've recall having bad experiences with doing things like this in the past – I'm afraid there will be permission issues somewhere down the road when I try to use these copied files.

Ideally I'd like to copy the files, and apply them with "default" permissions from my working Mac, as if those files had been created the working Mac, and not the failed Mac.

I don't want to access my files and not be able to/having to authenticate, because they "belong" to another user (i.e. the account on my old Mac).

tl;dr is there a way to copy another user account's (mine) files from a system drive, without running into permissions problems down the road? Maybe stripping the files of all user account-related permissions?

Best Answer

The simple solution to this is to reset all the permissions on all copied files to everyone read/write and let the system handle fixing them.

Reset all the permissions on a folder and its contents recursively with:

chmod -R 777 /path/to/folder

Then, run Repair Permissions in Disk Utility, and reset the ACLs on your home folder using the ACL tool on the Recovery HD:

  1. Boot into the Recovery HD using ⌘R.
  2. Run resetpassword in Terminal (available from Utilities → Terminal).
  3. Select your account from the drop-down list.
  4. Click the Reset button for Reset Home Directory Permissions and ACLs.