Unrelated Files Corrupted on System Restore
- by Yar
I restored OSX 10.6.2 today (was 10.6.3 and not booting) by copying the system over from a backup. The data directories were not touched.
In the data directories, I'm seeing some files as 0 bytes, and getting permission-denied errors when copying, even when using sudo cp or the Finder itself. Some programs, differently, take the files at face value and see no permission problems (such as zip), but they see the files as zero bytes, which would be game-over for recovery.
cp: .git/objects/fe/86b676974a44aa7f128a55bf27670f4a1073ca: could not copy extended attributes to /eraseme/blah/.git/objects/fe/86b676974a44aa7f128a55bf27670f4a1073ca: Operation not permitted
I have tried sudo chown, sudo chmod -R 777 and sudo chflags -R nouchg which do not change the end result.
Strangely, this is only affecting my .git directories (perhaps because they start with a period, but renaming them -- which works -- does not change anything).
What else can I do to take ownership of these files?
Edit: This question comes from StackOverflow because I originally thought it was a GIT problem. It's definitely not (just) GIT. Anyway, this is to help put some of the comments in context.