When you try to start Apple iTunes for Windows or MacOS, 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.
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
- Navigate to the location of your iTunes Library.itl file. It is usually found at “C:\Users\username\Music\iTunes“
- Right-click the “iTunes Library.itl” file, then choose “Properties“.
- Uncheck “Read-only“.
- 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.
- 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.
- Open a Command Prompt by pressing the “Windows Key” + “R“.
- Type “CMD” then press “Enter“.
- Navigate to the location where the music files are located. For Windows 10 users, it’s normally in the C:\Users\username\Music\iTunes\iTunes Media folder.
- 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.
- Exit iTunes.
- From the Finder, press “Command“, “Shift“, and “G“.
- Type “~/Music/iTunes/“, then press “Enter“.
- In the iTunes folder, there should be a “iTunes Library.itl” file. Rename this file to “iTunes Library.old“.
- Open the “Previous iTunes Libraries” folder.
- Find a file that says “iTunes Library <date>.itl” where the <date> is the most current date you can find.
- Move the “iTunes Library <date>.itl” file to the “~/Music/iTunes/” folder.
- Rename the “iTunes Library <date>.itl” file to “iTunes Library.itl“.
- 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.