When you open iTunes it reports "The iTunes Library file is locked, on a locked disk, or you do not have write permission for this file." Finally you will have to quit and cannot open iTunes.
Many iTunes users may get stuck with "The iTunes Library.itl files is locked problems" and unable to open iTunes, so they have no access to manage their iOS devices. In this situation, a totally reinstall of iTunes can do nothing help. Now follow me to make it clear and get some solutions for how to fix a locked "iTunes Library.itl" file.
"iTunes Library.itl" is an iTunes database file that will record all of your data (include Music, Movies, Photos, and etc.) for iTunes. Some users report that it's related to file permission in Windows and Mac system, so if you gain supervisor administrative privilege in your system, this file will be readable and writeable while you use iTunes. Here we provide you with some tricks to fix iTunes library error in Windows/Mac computers.
Normally, in Windows 10/8.1/8/7 system, the "iTunes Library.itl" file is set as "Read Only", during to some misoperation, the file property will be changed and cause unexpected problems.
Step 1: Exit iTunes and open Windows Explorer, navigate to C: >> Users >> Username >> Music >> iTunes. Here you will find the "iTunes Library.itl" file.
Step 2: In "Security" Tab, ensure the currently account has full control privilege to manage the file. If not, just click on "Edit" button and check the privileges.
Step 3: Right-click on "iTunes Library.itl", then choose "Properties", set the "Read-Only" option to unckeck status.
Step 4: Click "OK" to save settings and exit.
Now, you have successfully fixed "iTunes Library.itl" is locked is locked on a local disk and the file will be read and edit by iTunes, you can use iTunes to manage iOS devices again.
Instead of manually modifying the permissions. We can use a freeware TunesCare to fix the iTunes issue by one click.
Open TunesCare and connect an iOS device to computer via USB cable. You can repair the iTunes corrupted or missing library by clicking "Fix iTunes Sync Problems".
It is by far the eaisest way to fix iTunes sync problems, iTunes not working or iTunes cannot read contents on iPhone, etc.