Previous 1 2 3 Next 70 Replies Latest reply: Dec 18, 2013 4:16 PM by rmisaac
Niall Mallyon Level 1 (65 points)

I am using iTunes 10.6.1 (7) on Lion 10.7.4 and I have (yet again) noticed that iTunes has started creating multiple copies of Temp File.tmp in the iTunes folder.


It creates a copy every single time I do anything inside iTunes, including skipping a track or checking the iTune store.  I thought that maybe my ClamXav Sentry scanner was causing issues so I removed the iTune directory from the scan and even shut it down alltogether.  I have not shared my iTunes library either so I can se no reason that anything else is holding onto this file and causing iTunes to create a copy of the iTunes Music Library.xml file.


A disk repair has also not helped.


I have searched everywhere within the forums and via Google and can find no solution or explanation.


Its simple starts at some random time and they stops just as randomly.  However this time is particularly bad as EVERYTHING I do inside iTunes caused the problem.


Any help or guidance greatly appreciated.





MacBook Pro, Mac OS X (10.7.4)
  • Niall Mallyon Level 1 (65 points)

    Its just possible I may have resolved the issue but it took some tinkering and is not for the faint hearted.


    I tried to delete the iTunes Music Library.xml file in order to try and recreate it and I got a -8072 error.  I looked at the info for the file and noticed that the rights to the file could not be determined.


    I checked my rights to the Temp file.tmp file and I had the correct read/write ones. So I wondered if permissions were an issue hence iTunes recreating the file everytime.


    Having given my admin account the necessary access I used terminal to delete the original iTune Music Library.xml file and then renamed the .tmp file to be the correct iTunes Music Library.xml one.  They were the same size.


    I then logged back in with my normal non admin account and checked the rights I had to the file were still correct and they were.


    Now when I doing anything in iTunes the tmp files are created and then disappear as expected and I am left with the correct iTunes Music Library.xml file with the correct rights.


    I hope this has resolved my issue and will continue to monitor and report back if necessary.


    I also hope that this 'fix' may work for others and stay fixed!

  • Mr Blond Qc Level 1 (0 points)

    Hi guys,


    I have the same problem here. I just find that itunes was creating temp file.tmp for I don't know how long. As a result I find over 2000 files for 110GB total of temp files. I deleted them but iTunes still continues to recreate them.

    I have 25 temp files in two days! ****. After all my google reserch the only thing I found is this thread guys.

    Although I'm pretty good with macs not an expert/programer. I did in the past use terminal but I had precise instruction.

    I was wondering if you could coach me out in regards of fixing this problem.

    Could you be a bit more explecite on how you rename the iTunes Music Library.xml via terminal in order to fix the problem.

    I would be very gratefull.


    Thanks guys,



  • Niall Mallyon Level 1 (65 points)

    Alot will depend on whether or not you have only one account on your machine e.g an admin account.  If you do I haven't run any of the following by using just the one account.  I have 2.  A general user account and an admin one which I have used to correct the problem for the general user.  I'll do my best to help, though I can't be held responsible for any issues arising from this.  It worked for me but may not work for you.


    Firstly make sure you have a backup of you machine in case anything goes wrong.  At a minimum you should have a backup of all the files in the iTunes folder (not folders).


    Make sure iTunes is shut down and then delete all but the latest tmp file from the iTunes folder.  This should leave you with one tmp file of roughly the same size as the iTunes Music Library.xml file.  You can skip this step if worried and tidy up later but be sure to make a note of the name of the latest tmp file.  You'll need it later.


    Be sure whichever account you are using has write access to the iTunes folder.  You can do this in finder by using 'Get Info' on the folder and adding the administrator user as necessary in the access list at the bottom of the screen.  Again be sure its got write access.


    Now launch terminal.

    Within terminal issue the following commands :-


    Where xxxxx is user ID of account with issue

    i)          cd /Users/xxxxx/Music/iTunes


    ii)          rm "iTunes Music Library.xml"

    You'll get a message re overriding the file right - type y to override


    Where Temp File.tmp is the name of the latest tmp file

    iii)          mv Temp File.tmp iTunes Music Library.xml


    iv) exit


    Now close terminal


    The above commands will remove the problem file and rename the tmp file to be correct.  If you check the iTunes folder hopefully you'll see the tmp file has disappeared and a brand new iTunes Music Library.xml is there.


    You can run a repair disk permissions using Disk Utility at this stage if you wish.  Never harms to do this regularly anyway.


    You can now check the rights of the iTunes Music Library.xml in the iTunes folder using 'Get Info' this should now show that the account holder of the iTunes library had write access.


    Launch iTunes if all is OK and then monitor the iTunes folder.  You should see tmp files come and go normally whilst using iTunes but the tmp file issue should have disappeared. If it ever reoccurs then just follow the steps again,


    Good Luck.

  • Mr Blond Qc Level 1 (0 points)

    Hi Niall,


    First I really want to thank you for you time and effort in this matter. I really apreciate.


    I want to know what is the differance between doing this task in terminal instead of via Finder?


    Would the result would be the same?


    I tried via terminal but the command iii) did not work.


    So I finished it with finder.


    In the end iTunes is still creating the temp files.


    What do you think?


    THanks a lot!



  • Niall Mallyon Level 1 (65 points)



    I assume you are using finder under the admin account in which case there should be no difference.

    I find terminal easier in that I can do everything at once in one place.


    You don't mention if you have only one account or a standard and admin one.  I have only ever exerienced issues on a standard account as this has different system rights to an admin one.  I think this can lead to problems.  For me at least.


    Sadly I have no idea why your files are still being recreated.


    If have the same underlying issue as me and have followed the instrucions then I can't see why it wouldn't work.


    Have you checked the permissions to the 'new' iTune Music Library.xml file after you have copied the temp file to be that name?  The rights should show up and be correct for the account using iTunes.  The rights should be read and write.  I assume you have also got rid of all the other tmp files so you are left with a tidy iTune directory?


    Sorry I couldn't get it working for you.

  • Mr Blond Qc Level 1 (0 points)



    To answer your question I have only one account. So I don't think that would be the problem. Although, I might have found the answer to my problem. When I checked the XML file in the finder I found that the permissions were (under the command I function) unknown access.  When ever the XML file become unknown access itunes start to creating temp files.


    So when I fixed the problem the first time by replacing the XML filed by the temp file it give me the ability to fix the problem. I also restarted the computer and repaire disk permission. I continue to monitor the finder to check periodically if the problem was still going on.


    And today it did.

    So the source of my problem is that the XML file become unknown access for a reason that I don't know.


    Would you have any input on this?


    tune up.jpg

  • Niall Mallyon Level 1 (65 points)

    Your issue is therefore identical to mine, ignoring the single account.

    You need to check the lastest .tmp file in the same way and ensure that the permissions are OK on that one, then complete the steps I did.

    The issue is because iTunes cannot write to the iTunes Music Library.xml due to the permissions issue.

    If you ensure the latest .tmp file has the correct rights, you can then delete the iTunes Music Library.xml and all other .tmp files and then rename as above.  That should resolve the issue.

    I was able to recreate the problem by querying the permissions of the iTunes Music Library.xml when it was OK and this seemed to break things.  Not sure why.

    Anyway I think you have found your issue and its the same as mine. 

    Can be corrected with my steps but it may be worth trying to monitor the usage of the iTunes Music Library.xml to see if something is corrupting the permissions.  For instance do you have a virus scanner that is checking the file everytime it changes?.  This could cause an issue I guess.

  • Mr Blond Qc Level 1 (0 points)



    Well the only thing I don't know is why the xml files become at some point unknown access.

    I have Tune up software on my computer and I'm looking in to that to see if tune up would not have some kind of impact on this.


    I'll keep you posted for the update.


    well I want to say thank you very much for all your help in this.



  • Niall Mallyon Level 1 (65 points)

    I wish you luck.  Whilst unlikely its worth checking out.

    Once fixed mine has stayed OK so I think if you can get yours sorted and track down what is corrupting the XML file permissions it should stay fixed for you as well.

  • Jan Teurlings Level 1 (75 points)

    Just like to add that I had the same problem, and that this trick solved it but I had to change some things.


    First this info: I run one administrator account.


    I tried deleting the library file but got the wrong permission note - I checked and indeed the file had "Unknown privileges" or something similarly worded.


    Using the terminal I then deleted the file, by using commands i and ii.


    I next took, in the finder, the very last temp file being created by looking at create date. This was not "Temp File" but "Temp File 143". It was important to get the last created one because a previous attempt failed. I just renamed that file in the finder into iTune Music Library.xml, confirmed I wanted to change the extension, and deleted the remaing temp files. I have it now running for 12 hours without any temp files being created.

  • Mr Blond Qc Level 1 (0 points)

    Hi Jan,


    Thanks for letting us know. Keep me posted with that because I'm still in with the problem did not find the solution yet.

    I have update on my side that I will post soon. Keep monitoring the finder to see if the temp file reappear.


    Mine reappeared when I changed something in my itune. Like importing a new album for exemple. For me it took 2 days and then itune was back to creating the temp file.

    Hope you solve your problem.

  • Mr Blond Qc Level 1 (0 points)

    Hey Guys,


    It's seem that the source of the problem is the XML that become at some point Unknown Access.

    Can you tell me how old is your library? Mine originally started in 2007 and I just keep updating it with the upgrade.

  • Jan Teurlings Level 1 (75 points)

    Mine library is even older, from like 2003  or so. At this moment the library is keeping its permissions and there are no temp files reappearing, even though I have added and removed some music from the library. Will keep you updated.



  • Niall Mallyon Level 1 (65 points)

    I'm begining to wonder if this is a library issue.


    I have a 100% fresh install of Mountain Lion 10.8.1 and iTunes 10.7 and this problem has now happened again today.  The permissions on the XML changed.  I copied the library over from my previous Lion 10.7.4 and iTunes 10.6.3 config so the problem is following the library but why this should be I have no idea. 


    Strangely it has 'fixed' itself and the tmp files have stopped.  Permissions are back to normal on the xml.


    Really really cheesed off.  Perhaps the new iTunes 11 in October will finally out this to rest(!)

Previous 1 2 3 Next