Unknown Error Occurred (-54) Enabling iTunes Match

itunesitunes-match

I just added my Apple ID to a new MacBook Pro and tried to turn on iTunes Match. This is the error I get:

iTunes Match Error

The only info I can find indicates this is a connection error, but I can connect to other areas of the iTunes Store. Any ideas how I can resolve this?

Best Answer

According to this discussion or this one it seems (-54) is a file-lock problem. The proposed solutions are:

  • an AppleScript to remove locks

    Open the Script Editor in the /Applications/Utilities folder and run the following:
    tell application "Finder" set locked of every item of entire contents of folder "Music:iTunes" of home to false end tell

  • use Terminal to ensure ownership, group, and permissions are correct
    • use sudo chown your-username your-filename if you don't own the file/folder
    • use sudo chgrp staff your-filename if it isn't set to the same group as other iTunes items
    • use chmod 666 your-filename and/or chmod 777 your-folder-name to make sure everyone (and thing) can edit
  • disabling FileVault if used

In particular, check the permissions on the iTunes/Download folder which is where iTunes will first attempt to download "matched" songs.