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.
MacOS Instructions
- 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.
Taran says
i get a “program open in windows host” error when i try to rename it
jim says
thanks, well written and to the point
T.J. ELLIOTT says
Thanks so much! This was a lifesaver.
Felip Gallardo says
Thanks, MacOS Option worked for me!
Anna says
tommy thanks for the solution! it worked for me!
Ron says
Try this: Go to c:\Users\yourusername\Music\iTunes
Notice the file iTunes Library.itl. It is probably corrupted and needs to be replaced. Do the following:
1. Rename the iTunes Library.itl file to iTunes Library.itlOLD
2. Look in the folder “Previous iTunes Libraries
3. Copy the file you see, it will look something like iTunes Library 2019-04-12.itl to the iTunes directory.
4. Rename it to iTunes Library.itl
Connect your iPod and then launch iTunes to see if it works.
Rory McBride says
Neither of these options worked for me :-(
Any other suggestions for windows 10?
Alex T, B.S., M.B.A., PPGBA, Treas. says
Aloha Mitch Bartlett,
Even though the “Locked” selection, in the Get Information screen is still shaded, and not accessible, I was able to do everything, step-by-step, as advised, to get my iTunes up and running. I tested iTunes by listening to one song, and it worked.
Much Mahalo!
Brian Balta says
I tried all the suggestions here and it even still tells me “Access Denied” when I try the command prompt run settings. These files are not listed as read only and none of these commands allow access.
tommy says
I had this same problem and the solution was very simple, I have renamed the iTuneslibrary..itl to iTunesLibrary.old and hit enter … works like charm
City Guy says
Hi
Same problem for me which started after the latest WIN 10 update from a few weeks ago.I tried the suggested fixes listed above. Unfortunately, none solved the problem.
But I found a solution for this issue on my computer, I simply the moved the entire iTunes folder from the WIN 10 Music folder to the C drive, opened iTunes, created a new library at the new iTunes folder location, and it now works perfectly.
This suggests that something in the WIN 10 security/ access settings is the problem. I’m not sure I will diagnose and further, since iTunes is working, and I don’t believe there is a problem with keeping the iTunes folder on the C drive.
Anyway, maybe this will be a viable solution for others.
Deepak says
Thanks for the information it helped me to solve my problem..!!
wakeelah says
I never have this problem with window media player .. the worst that has happened album shows as unknown when they is a lot of different artists on one album. ITunes sucks .
Ryan says
one more thing: close keepvid music if you’re using it. it’s causing the problem.
v says
worked on windows 10! thanks so much!
Denis says
I have used Onyx (on Mac). ran it and repaired Permissions. And everything works again.
Mikey says
just delete those three and open iTunes it will generate fresh files
Steve says
Thank you so much!! This worked on my Mac.
oyeniyi ayobami says
thank you it was really helpful, but after the library the library extra also got locked but repeated the process and it worked. thank you
Jon says
I had this problem, but I had the far superior CopyTrans Manager open at the same time. Closed CopyTrans, all OK.
Nicola Jones says
I right clicked the library file, chose properties then advance. I then unchecked the ‘file is ready to archive’ box, saved and it opened iTunes
Paul says
I had the same problem with windows 10, I tried just about everything I had admin rights check all security rights, then by chance I right clicked the shortcut icon from iTunes bottom right was an advance button click that then it gave me option to run as administrator which I ticked but I was already administrator but it worked.
So no more issues with iTunes lock
Hope this helps Paul
xying says
Hi Joerg, I just replaced the itl file, but it doesn’t work. Could you tell me where I can get the Genius.itdb and Extras.itdb to replace. Thanks a lot!
joerg voellger says
I replaced the 3 files “iTunes Library .itl; iTunes Library Genius.itdb and iTunes Library Extras.itdb” by the files from my old macbook then I renamed the files,
after restart and an update, it works fine.
Thank You for the help