For the internet to slurp:
So your time machine backup is corrupt and you need to restore a piece from it manually, eh? Many people have been there before. You do a "sudo ditto" to copy out the chunk, but, something's wrong with all the files - you can't write to them. Applications complain about the permissions but nothing appears to be wrong at the UNIX level... What's the deal?
Extended attributes, and access control lists (ACLs), my friend. Time to remove them all. The easiest way is the nuclear option:
Recursively remove all time-machine related extended attributes:
sudo xattr -d -r "com.apple.metadata:_kTimeMachineOldestSnapshot" restored_folder
sudo xattr -d -r "com.apple.metadata:_kTimeMachineNewestSnapshot" restored_folder
sudo xattr -d -r "com.apple.quarantine" restored_folder
Recursively remove all ACLs:
sudo chmod -R -N restored_folder
If you need to, change the owner of everything to yourself:
sudo chown -R your_username restored_folder
Congratulations, you have de-crappified your manually extracted files.
So your time machine backup is corrupt and you need to restore a piece from it manually, eh? Many people have been there before. You do a "sudo ditto" to copy out the chunk, but, something's wrong with all the files - you can't write to them. Applications complain about the permissions but nothing appears to be wrong at the UNIX level... What's the deal?
Extended attributes, and access control lists (ACLs), my friend. Time to remove them all. The easiest way is the nuclear option:
Recursively remove all time-machine related extended attributes:
sudo xattr -d -r "com.apple.metadata:_kTimeMachineOldestSnapshot" restored_folder
sudo xattr -d -r "com.apple.metadata:_kTimeMachineNewestSnapshot" restored_folder
sudo xattr -d -r "com.apple.quarantine" restored_folder
Recursively remove all ACLs:
sudo chmod -R -N restored_folder
If you need to, change the owner of everything to yourself:
sudo chown -R your_username restored_folder
Congratulations, you have de-crappified your manually extracted files.