can't add all files to git due to permissions
Use git add --ignore-errors .
This will still give an error for the unreadable file(s), but not a fatal one. The other files will be added.
Closing your IDE or whatever that uses the relative files you want to upload solved my problem
Would it help if you added that file to your .gitignore file? So all other files would be versioned and that file would get ignored (unless you need it).