Using git on scripts - Why do i have to keep setting project permissions on launching unity?


I'm using git for managing the source control of my .cs scripts inside my assets/scripts folder. This is where git's .git folder lives.

Everytime i commit changes to files, the next time i run unity a dialog pops up saying something like, the project permissions need to be writable. Sorry i didn't note down exactly what it says. I also bizarrely have to authenticate as myself for this action to succeed and unity to launch.

It's nothing more than an inconvenience but if its fixable i would like to know how.

I was worried unity was perhaps seeing the .git folder and getting flustered by something inside it, but have been told that unity should ignore . prefixed files.

Thanks for your time

I got this message after some git commits up until Unity 2.6, and after bugging them about it they were kind enough to fix it. Here's part of the answer I received for my bug report, it might answer your question of what's going on:

Unity only requires execute bit on directories, not plain files.

However when fixing the permissions it does set the permissions to read, write and execute on all files and directories. This will be fixed in the upcoming 2.6 release of Unity.

In short, Unity used to demand that even source files were 755, but git kept setting them to 644. It seems that Unity iPhone still does it the old way, so you may want to raise a bug report/feature request for it. My case was 268479, in case you wish to reference it.