20

I'm new to tortoise... When I try to run SVN update on c:\folder on Windows Server 2008 R2, I get the error messages:

  1. "working copy of 'c:\folder' locked.
  2. attempt to write a readonly database

It seems like I need to change file / folder permissions... What do I change them to?

Hoppe
  • 6,508
  • 17
  • 60
  • 114

5 Answers5

30

I had to give my own account full control of the directory. It seemed to have lost those permissions when being copied using my powershell script, which was running as administrator

Hoppe
  • 6,508
  • 17
  • 60
  • 114
  • 1
    In the Local Administrators group but still had to add myself explicitly to the permissions before it would allow me to `commit`. – user692942 Jun 02 '14 at 15:32
  • Enabling inheritance in Advanced Security Setting for the folder solved my issue. – Rohith Nov 19 '14 at 09:37
4

You're right. Try giving your Windows user account full rights on the working copy folder. It worked for me too. From what I experienced, this is a kind of logical issue. Actually it is not even an issue, but a normal thing. In brief words: when one Windows user works on a working copy, he locks the working copy for himself. If then another user tries to work on that same working copy, he cannot, because the previous user still works on it, thus it is still locked by the first user (until he commits and releases the lock).

So yes. In case you have no other option, give your Windows user account full rights on the folder if you can.

My case was the following. I have a portable hard drive on which I have the working copy. Yesterday I worked with that hard drive on one computer and I did not commit. Today I had to use a different computer, thus under a different Windows user but with that same portable hard drive. Of course the working copy was locked and I could not update, nor commit, nor clean... I could do nothing. So I gave my current user full rights on that folder and it worked.

Hope it makes sense now. :)

bluish
  • 26,356
  • 27
  • 122
  • 180
AlexRebula
  • 922
  • 2
  • 13
  • 26
0

Try to use the Release lock command on that folder.

And then a Clean up too. Perhaps it will solve the problem.

Aak
  • 182
  • 9
  • both commands result in the error message 'attempt to write a readonly database'. If it helps any, the folder was created by a powershell script with administrator priviledges. It seems like running SVN update as administrator works... but we'd like to be able to use the shell plugin to use tortoise as well. – Hoppe Sep 21 '12 at 13:08
  • +1 Aak - this seemed to get some of my folders working. I think Tortoise SVN got corrupted, somehow. –  Jan 13 '14 at 15:15
0

You need to explicitly add your user to the folder (not just a group your user belongs to).

  1. Right-click the folder -> Properties
  2. Security -> Edit...
  3. Add...
  4. Add your user and give "Modify" permissions
voidstate
  • 7,937
  • 4
  • 40
  • 52
0

This got fixed by adding my windows account to the directory and giving full access to the account on the directory.