IPhone – How to fix iTunes could not copy unknown error (-5000)

iphoneitunes

I got this error trying to sync from my Macbook Pro (OSX Yosemite, 10.10.5) to my iPhone SE:

iTunes could not copy "The Song Remains the Same" to the iPhone "Dan's Phone" because an unknown error occurred (-5000).

Oddly, the problem didn't occur with my previous iPhone 5s. How do I fix it?

Best Answer

The solution was simple - it was a permissions problem. On the Mac, here are the steps I took to fix:

  • Note the song that fails, on my case it was a Zeppelin song.
  • Using the terminal, cd to the directory containing the song
  • Run ls -la and note the owner/permissions of the file that fails, in my case it was an alternate username I was using at one point, let's say that username is paulhewson, and your real username is hewson
  • Run sudo find . -user paulhewson from the top level music directory (~/Music), this shows all the music that is owned by this alternate user
  • This command will change the owner to your normal username: sudo find . -user paulhewson -exec chown hewson {} +

I suspect this error could result from any sort of permission problem, in some cases maybe read-only or locked files, in which case you'd want to chmod or unlock the files. If there are multiple types of permission problems, you may need to repeat this process a few times. Might be easier to chmod/chown everything in music, but I tried to avoid that so I didn't cause other issues.

Credit to this question for help with the find command to change ownership: Change owner for all files owned by x