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.

Let’s get started…

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

  1. Navigate to the iTunes Library.itl file C:\Users\user\Music\iTunes
  2. Right-click on iTunes Library > Properties

Unselect Read-only

  1. Unselect Read-only
  2. Click the Security tab then click Edit to change permissions
  3. Make sure Full Control is Allowed
  4. 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

  1. Hold the Windows + R key to open Run
  2. Type cmd.exe to open Command Prompt
  3. Navigate to the media files in File Explorer C:\Users\user\Music\iTunes\iTunes Media

attrib command promt

  1. 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.

  1. In File Explorer, navigate to C:\Users\user\Music\iTunes
  2. Right-click and delete the file
  3. Open iTunes to generate a new Library.itl file

MacOS: Repair File Permissions

  1. Click on Go > Utilities
  2. Click on the disk on the left containing the iTunes Library .itl file
  3. Click the First Aid tab

repair disk permissions

  1. Click on Repair Disk Permissions at the bottom
  2. 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

  1. In the Finder, Press Command, Shift, and G
  2. Paste ~/Music/iTunes then Enter
  3. In this folder, Rename iTunesLibrary.itl to iTunesLibrary.old
  4. Open iTunes and check if it worked

Bottom Line

The quickest way to fix this error would be to change the write permissions for Library.itl.

If none of these steps worked, comment down below.

If you liked this article, share it.