Mac OS: Can’t move .svn/tmp/entries to .svn/entries: Operation not permitted

5 Aug 2012

, , ,


I’ve recently had a completely new (to me) SVN problem. I’ve been trying to update my SVN working copy from the reposisty and I get this error:

Can’t move ‘.svn/tmp/entries’ to ‘.svn/entries’: Operation not permitted

I’ve tried running the svn cleanup, but no joy. Google is my friend… the fix is to run this command in terminal

cd workingdir
chflags -Rv nouchg .

chflags – Change File Flags command
-R recursive, -v Verbose (tells you which files changed)
nouchg means the file can be changed (immutable bit cleared)

The immutable bit was a new one to me, so I had to go and look that one up as well. When you can’t take the chance of a file getting accidentally munged, you can set the immutable bit. Not even root can delete a file with the immutable bit set, unless they clears the bit first (making accidental removal highly unlikely). Very sensible, and since I’m exactly the kind of person who might accidentally delete whole swaths of files while in root mode, I can really see the point of an immutable bit.

However, I couldn’t work out how or where the immutable bit was being set. More googling … this seems to be a common problem where some developers are using windows & others are using mac os x. Still not sure of the WHY but the context makes sense.