32

A working copy of an app is returning the described error when trying to Update.

Can this error be caused by having insufficient permissions to write to the folder (or some of the files within it)?

I've tried the "Release Lock" function and Tortoise tells me there are no locks.

Highly Irregular
  • 38,000
  • 12
  • 52
  • 70
  • Yes, that is one possible cause. Where is your working copy located (local disk, network share, etc.)? Are you running an on-access virus scanner and if so, which one? Have you tried the same operation with `svn.exe` at the command prompt? – alroc Feb 27 '13 at 14:27
  • @alroc, it's a remote linux server that I have no shell access to. I can access the web root through Windows as the server runs samba. It's likely I don't have permission, but I wonder if there might be other possibilities such as the working copy being created with an old version of svn, or just corrupt data. – Highly Irregular Feb 27 '13 at 21:13
  • 2
    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](http://serverfault.com/a/161293) - 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. – alroc Feb 28 '13 at 02:35
  • @alroc, if you'd like to quickly put that into an answer, I'll accept it. Thanks! – Highly Irregular Mar 03 '13 at 22:12
  • I've made it an answer – alroc Mar 03 '13 at 22:22
  • See also http://stackoverflow.com/questions/11697446/permissions-and-svn-updates-on-windows-server-2008-same-folder-svn-account-d – Vadzim Dec 16 '14 at 20:16

10 Answers10

38

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.

acdcjunior
  • 132,397
  • 37
  • 331
  • 304
  • 2
    I was on Windows Server 2008 on the command line svn and got this message, when I set the privileges it worked. – John Mott Dec 18 '14 at 02:06
  • 2
    It seems dangerous (and difficult?) to run windows explorer as administrator. Instead I ran command prompt as administrator, navigated to my repo folder, and ran `svn upgrade` – jxmallett Jan 11 '15 at 23:28
  • Actually, that just let me do the upgrade but all subsequent tortoise commands still fail with sqlite errors. My problem was that I didn't own the folder. To change owners on Windows 8.1: `Folder Properties > Security > Advanced > Change Owner` – jxmallett Jan 12 '15 at 00:25
  • 2
    For me to fix this, I needed to explicitly add my local user to the folder security permissions Right-click the folder -> Properties Security -> Edit... Add... Add your user and give "Modify" permissions This needed to be applied to the entire svn path e.g C:/Projects/**myapp/folder/file.txt** – Ross Jun 22 '15 at 10:19
  • 1
    I was on Linux, but this saved my life actually. I have checked those `.svn` directory and suddenly it appeared that most of the files there were owned by different user. Running `chown -R : /path/to/workspace/.svn` under root finally fixed the issue, HUGE thanks for the note! – RAM237 Sep 27 '19 at 14:09
9

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

Community
  • 1
  • 1
alroc
  • 27,574
  • 6
  • 51
  • 97
9

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.

ehambright
  • 1,416
  • 19
  • 27
8

This error can occur if write access is not available for your group to the rep-cache.db file in your repository on the SVN server. You'll need access to the SVN server or get someone who has access.

Search for the rep-cache.db file:

find / | grep rep-cache.db

Go to the db subdirectory under the repository that you are working with and type the following:

chmod g+w rep-cache.db

Typically the group has only read-only access when this error occurs. This will give the group read/write, which should stop the error from occurring.

Simon
  • 456
  • 6
  • 11
4

I got this error, because I moved my repositories to a new server. The main folder was created by root. As a result, there was an inconsistance of rights between restored files and newly created files. chown -R on the main folder solved the problem.

3

I got this error recently and it was because I had logged into my development environment using the wrong user account. I had set the project up on a development VM using the local Administrator account. I got this error when I logged in user my personal account who was not a local Windows Admin. So in my case it was due to Windows permissions.

rf_wilson
  • 1,562
  • 5
  • 32
  • 44
3

I got the same error when copying whole SVN repo to another location. When I checked Windows permissions, everything seemed fine. I reapplied Windows permissions and all of a sudden Windows applied permissions and from then on everything is working fine.

Mr. I
  • 96
  • 1
  • 5
2

For Ubuntu users

when you setup project on a public directory such as home don't use sudo on it. ex: sudo mkdir folderName use mkdir folderName or create it manually.

when you created using sudo you get the folder as locked.(check image with and without sudo)

enter image description here


As well don't use sudo svn co http://path/to/trunk/ ./ use without sudo

like this

svn co http://path/to/trunk/ ./


Just got this error and solved well

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
1

Had this on windows 7 system, after waiting 10 mins the SVN update was available without problems. Maybe a problem during Tortoise startup.

Matthias
  • 353
  • 2
  • 11
0

I also faced the same issue.

Resolution is :

chmod g+w rep-cache.db this file can be found under /db/