‘The iTunes Library.itl file is locked, on a locked disk, or you do not have write permission for this file’ is an error that comes up on iTunes for both Mac and Windows.
Another similar error a lot of people have seen is ‘the iTunes Library .itl file cannot be read’.
This error comes up as soon as you open the app and it can be quite confusing as it gives you no solutions to fix it. Since you do not have write permission for the Library.itl file, I’m going to show you how to get it.
The Reason for the Error
You’re seeing this error message is because the Library .itl file has been set as a read-only file. This means that the file can only be opened and read – it can’t be changed or altered in anyway.
So, you won’t be able to open iTunes successfully until the Library .itl file has been given write permission.
Windows: Give iTunes Write Permissions
- Navigate to the iTunes Library.itl file C:\Users\user\Music\iTunes
- Right-click on iTunes Library > Properties
- Unselect Read-only
- Click the Security tab then click Edit to change permissions
- Make sure Full Control is Allowed
- Click OK
iTunes should now open without any errors popping up on the screen.
This is because you’ve given the file that allows iTunes to open, write access and full control.
Windows: Use Attrib Command
- Hold the Windows + R key to open Run
- Type cmd.exe to open Command Prompt
- Navigate to the media files in File Explorer C:\Users\user\Music\iTunes\iTunes Media
- In Command Promt, paste attrib *.* -r +a -s -h /s and click Enter to run the prompt
Visit iTunes after the command has been run and you shouldn’t see any errors pop up.
Windows: Delete Library.itl File
Your last attempt to fix this problem on Windows is to fully delete the library.itl file in the iTunes folder.
You should only try this step if you have no other hope and you’re willing to risk losing data from iTunes.
- In File Explorer, navigate to C:\Users\user\Music\iTunes
- Right-click and delete the file
- Open iTunes to generate a new Library.itl file
MacOS: Repair File Permissions
- Click on Go > Utilities
- Click on the disk on the left containing the iTunes Library .itl file
- Click the First Aid tab
- Click on Repair Disk Permissions at the bottom
- A message saying ‘Permissions repair complete’ when it’s been repaired
Open iTunes and check if there are any more errors popping up after the permissions have been fixed.
MacOS: Rename Library.itl file
- In the Finder, Press Command, Shift, and G
- Paste ~/Music/iTunes then Enter
- In this folder, Rename iTunesLibrary.itl to iTunesLibrary.old
- Open iTunes and check if it worked