Solve “The iTunes Library.itl file is locked” Error in iTunes

When you try to start Apple iTunes for Windows or Mac OSX, you get an error message that says:

The iTunes Library.itl file is locked, on a locked disk, or you do not have write permission for this file.

iTunes Library itl file error

This happens commonly because, somehow the iTunes Library.itl file got set as read only. You can fix this by doing the following steps.

Windows Option 1 – Windows File Settings

  1. Navigate to the location of your iTunes Library.itl file. It is usually found at “C:\Users\username\Music\iTunes”
  2. Right-click the “iTunes Library.itl” file, then choose “Properties“.
  3. Uncheck “Read-only“.
  4. If you have a “Security” tab, select it. Ensure that your account has “Full Control” permissions to the file. If you don’t have this tab, ignore this step.
  5. Click “OK“.

Windows Option 2 – Using Attrib

This option is for expert users who know their way around a Command Prompt. These steps will set the iTunes folder where they are readable again.

  1. Open a Command Prompt by pressing the “Windows Key” + “R“.
  2. Type “CMD” then press “Enter“.
  3. Navigate to the location where the music files are located. For Windows 7 users, it’s normally in the C:\Users\username\Music\iTunes\iTunes Media folder.
  4. Type “attrib *.*  -r +a -s -h /s“, then press “Enter“.

This command may take a few minutes to run. Once complete, try to open iTunes again.

Mac OSX Option

  1. Exit iTunes.
  2. From the Finder, press “Command“, “Shift“, and “G“.
  3. Type “~/Music/iTunes/“, then press “Enter“.
  4. In the iTunes folder, there should be a “iTunes Library.itl” file. Rename this file to “iTunes Library.old“.
  5. Open the “Previous iTunes Libraries” folder.
  6. Find a file that says “iTunes Library <date>.itl” where the <date> is the most current date you can find.
  7. Move the “iTunes Library <date>.itl” file to the “~/Music/iTunes/” folder.
  8. Rename the “iTunes Library <date>.itl” file to “iTunes Library.itl“.
  9. Now try to start iTunes.

If none of the above steps work for you, it may be a bit more complex. Some people have told me they just delete the “iTunes Library.itl” file or delete everything in the “C:\Users\username\Music\iTunes” folder except “iTunes Media“, and it works for them. I think it’s risky to do that since you could lose data, but you may want to give that a try if you’re desperate.

Leave a Reply

Your email address will not be published. Required fields are marked *