Solution for TortoiseSVN + Samba shares permissions problem. "Can't move".

Публикувано / posted 2008-09-25 в категория / in category: Web development
  

I had significant problems with commiting changes to svn repository for my Tangra Framework. Repository was at sourceforge.net. For ages I am using one and the same configuration and just recently I've started to have problems with commits.

Configuration:

Linux server with Debian/GNU linux + Apache + Samba (3.2.0.31-2) + PHP, etc.

Windows XP with Zend Studio, Dreamweaver, TortoiseSVN, etc.

Working copy of the framework is shared as Samba share. Yes, I know that this is not recommended but it is most convenient way -- I am able to edit files directly from my windows PC. 

After upgrade to TortoiseSVN 1.5.* all commits that added new files was showing error like:

"Commit succeeded but…"

"Error: "Error bumping revisions post-commit (details follow):"

"Error: "Can't move" (some files from .svn/props/ to .svn/prob-base/).

After above error I was unable to commit anymore -- svn was stating that I have to execute Clean Up, but when trying to do so -- clean up was failing. I had to delete whole dir that was failing, then to update parent dir in order to obtain clean working copy. That was working solution when just one dir was messed up but when I had multiple dirs with same problem -- I hade to checkout the entire trunk which tooked about 1hour (because sourcefourge svn is slow, project itself is not vary big.)

Solution:

Open your smb.conf and add following line to the options of your share:
delete readonly = yes
Restart samba.
Example:
[tangra]
path = /www/inc/tangra
browsable = yes
public = yes
writable = yes
valid users = ogg
create mask = 0664
directory mask = 0775
force group = webdevelopers
delete readonly = yes
Problems with the commits are caused by file permissions of files in .svn subdirs. They are with perm 444 and by some reason TortoisSVN starting from version 1.5.* was unable to move them (1.4 versions did not had such problem). Some people suggested that this is caused by a bug in Samba (and some stated that upgrading samba to latest version resolved the problem).
I found the solution here: http://www.flashmark.co.uk/blog/?p=5, so all credits go to these guys.
I'm creating this (dulicate) posting just for one reason:
Google to index it with its title which is more easy to find when you use keyphrase like "tortoisesvn samba problem". I've spend more than a day searching with google until I found the solution provided by flashmark…
If you are using working copies on shamba shares next article may be quite useful for you:

Comments are closed.