Repair security permissions for iTunes for Windows

Last modified: Dec 23, 2022 11:09 AM
35 141189 Last modified Dec 23, 2022 11:09 AM

If you are unable to edit tag information in iTunes it is likely that the files are marked as read-only or your account does not have the correct security permissions to make changes. This can happen when a library is moved between computers or accessed by a different account on the same computer. The error message "The iTunes Library.itl file is locked, on a locked disk or you do not have write permission for this file" can also be a result of permissions problems. The following process should install the correct permissions.


Right-click on your main iTunes folder (normally in User's Music unless you have relocated it) and click Properties, then go to the Security tab and click Advanced. Use the Change Permissions... button grant to your account (or the Users group) and SYSTEM full control of this folder, subfolders and files, then tick the option to Replace permissions entries... which will repair permissions throughout the library. Note also that the Administrators group should normally have full control, though iTunes should work properly either way. When the permissions have been applied switch to the General tab of the folder properties dialog, click in the Read-only check box to clear it, then click Apply.



If you don't have the option to change the permissions then use the Owner tab and Edit... button to take ownership from an account with administrator privileges. Tick the option to Replace owner on subcontainers and objects.


Repeat with the media folder if it isn't stored inside the main iTunes folder and/or with any other folders that you may have imported media from while leaving it in the original location.


Note that after applying such repairs folders will still show a read-only flag but any read-only files will have been reset to read-write status.


If you have brought over the library from another computer, and you don't plan to use the library on both computers in future, then you may also want to remove any "mystery" identities (S<string of dashes & digits>) that have come over from the old computer.




Multiple tags (MP3 files only)

If you have applied the permissions fix and tracks still won't accept your updates then a remaining possibility for MP3 files is that they have multiple tags. The ID3 specification allows files to have multiple tags in different versions and languages, but iTunes only works properly with single tags. When multiple tags are present it can sometimes fail to apply updates to the tag that it later reads back (presumably updating one of the others in the file) and it is also possible that iPod & iTunes may have different rules for which tag they give priority to. This could lead to situations in which everything is properly organised in iTunes but then inexplicably falls apart on an iPod or iOS device, or tracks that display different information in Windows Explorer or another media player. There are 3rd party tag editors that can manipulate multiple tags but I don't have a recommendation offhand. A workaround in iTunes is to use File > Convert > Convert ID3 Tags... > None a few times to remove all existing tags and then File > Convert > Convert ID3 Tags... > v2.3 to build a fresh tag with the information still held in the iTunes database. I've read in the past that iTunes isn't fully compliant with the v2.4 spec. although this may no longer be the case, however support for v2.3 is widespread so I would suggest using v2.3 over v2.4. Any embedded artwork will be removed so this needs to be replaced if wanted. For Windows users running a script called CreateFolderArt before and after the tag cleaning process should manage this.




File is locked, on a locked disk, or you don't have write permission errors

In some cases Windows Defender in Windows 10 may block file activity by iTunes that should be allowed. See how to turn off Controlled folder access in Windows Defender in order to allow iTunes to run normally. Other anti-virus software can potentially cause similar problems, and excluding the iTunes folder from real-time scanning may help.




Blocked files

Files downloaded from the Internet may be blocked from routine access in Windows Explorer as a security measure, which may also prevent them from being imported into iTunes. Right-click on such files and then select Properties. In the General tab, click Unblock if present, click Apply and then click OK.




AirPlay

iTunes might not be able to save changes to tags while AirPlay is active.




WAV Format

iTunes can associate store artwork with tracks in .wav format, but these files don't carry a tag so you cannot add custom artwork. Any metadata associated with the files is only saved in the iTunes database and is lost if such files are imported into a new library.




iTunes Store purchases

In some cases store purchases where you've set custom metadata may revert to the details held by the store. This appears to be an unintended consequence of the way that your purchase history in the cloud is integrated with locally stored media. To prevent this happening you can hide your purchases for affected items while retaining a local copy. Unless you have iCloud Music Library as part of Apple Music or iTunes Match purchases also need to be stored locally in order to make changes to them.




Untagged files

There is an obscure issue where tracks that have no value in the name/title field of their tag may not get moved or renamed when changing data in other fields, even though Keep organized.... is enabled. Update the song name to resolve. See NameToTag for a Windows script that can quickly modify and restore the names of selected files forcing the data to be written to the tag. It also seems that attempts to add artwork to otherwise untagged files may fail so entering some text information first and applying may help here.




Related support documents and user tips:

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.