TortoiseSVN error "Working copy locked" "sqlite: attempt to write a readonly database" - Can this be caused by incorrect permissions?

I got that very error with TortoiseSVN under Windows. Apparently, the .svn folder has a small SQLite database file, which, if you don't have write access to, will cause that error.

As I was using TortoiseSVN through the windows shell (the right-click) menu, to work around it I ran the windows explorer I used to navigate to the folder as administrator and everything worked fine.

Another solution, of course, would be to give write rights to the user you are trying to use TortoiseSVN with.


Working copies on shares frequently cause problems (including/especially with permissions) - as a result, it is not a recommended configuration. There actually was a bug in quite a few releases of Samba that was triggered by SVN 1.5 or 1.6 which caused a number of issues like this. It can be worked around with a change to the Samba configuration - but this may not resolve all of your issues. Best practice is to not do what you are doing - only operate on WCs locally, not via shares


While not related to tortoise, I just had this error because I ran svn update as root (forgot I was su'd on a Linux box) and got a conflict.

Fixing it was as simple as doing a chown -R user .svn and then chmod ug=rwx on the file wc.db in the .svn folder.

Tags:

Tortoisesvn