iOS Build Permissions Error

Everytime I try and build my iOS project I get the following exception:

Error building Player: UnauthorizedAccessException: Access to the path “/Temp/StagingArea/iPhone-Trampoline/Unity-iPhone.xcodeproj/project.pbxproj” is denied.

It seems like unity is generating read-only temp files, at which point the build breaks when it tries to edit them. I’ve tried deleting the files and ensuring nothing is accessing them but nothing seems to work, any ideas?

We had a similar project when we where building for mac. According to one of our artists he had to tell mac to give unity permission to run it or something similar. He is a mac man so i will ask him if this does not make sense:)

I had a similar problem on Mac, when using P4 and doing a bunch of rollbacks.
Even deleting the Temp folder Did NOT work.

What worked is rebooting the Mac!