Myth1c
Myth1c

Reputation: 649

SVN Commit error: Can't open file txn-current-lock Permission denied

I can do checkouts, update and such. But when I try to commit changes, SVN gives me the following error:

Can't open file '/svn/p/pokemonium/code/db/txn-current-lock': Permission denied

I am using Windows 7 x64 SP1 with latest version of TortoiseSVN. UAC is off, my account has read and write access, etc.

I can commit fine to other svn repositorys.

Upvotes: 8

Views: 34988

Answers (7)

user1280545
user1280545

Reputation: 33

permissions worked for me too

error

repo/db/txn-current-lock: Permission denied

fix

chown apache:apache -R my_repo_root

Upvotes: 0

S. Stanton
S. Stanton

Reputation: 21

In my own case, my linux server had been restarted after a power loss. The file system remained mounted as read-only since some journal repairs had been made. Rebooting the machine restored full function.

Upvotes: 0

Ari0nhh
Ari0nhh

Reputation: 5920

This is a server configuration issue. On windows host Visual SVN server runs under NETWORK SERVICE account by default. I solved this problem by granting full access rights to the repository folder to this account. Another option is switching Visual SVN service to the SYSTEM account, but that could pose a potential security risk.

Upvotes: 11

Fritz W
Fritz W

Reputation: 61

I had the same problem after I re-installed Windows 7 and just copied the SVN Repository from the old Windows to the new one.

After trying the steps that Mr. Manager proposed, the problem was still not fixed in my case.

After making sure that the permissions was setup correctly for the SVN Repository folder I just deleted the file 'txn-current-lock' in the /db folder of the project. That fixed it for me. From thereon I could commit my project again.

Upvotes: 1

Greg Desmarais
Greg Desmarais

Reputation: 336

For me it ended up being a permissions issue on the server. I have my repo on a linux box, and ssh in to use svnadmin. For convenience sake, I had executed my create repository command as root. I was looking to get source I had on my Windows box into the repo, so was using TortoiseSVN to set up trunk/branches/tags. The directory containing the repo on the server was owned by root, and Tortoise was coming in as apache. I chowned the directory on the server to apache:apache, and it all went smoothly.

chown apache:apache -R my_repo_root

Upvotes: 12

user2587586
user2587586

Reputation:

I had faced same issue on Unix box

Restarting the Apache service of the SVN server solved myproblem.

-f httpd.conf -k stop

-f httpd.conf -k start

Upvotes: 0

Doug Chamberlain
Doug Chamberlain

Reputation: 11341

Try this.

  1. Make a back up copy of your working copy (just to be safe).
  2. Make another copy your entire working copy off somewhere else.
  3. Take the copy and delete all of the SVN folders out of it
  4. Delete your working copy and do a fresh checkout
  5. now copy/paste your corrupted working copy over your fresh checkout.

it is critical for this to work that you have completely removed ever _svn or .svn folder from your corrupted working copy before you perform the copy/paste.

This will leave you (hopefully) with a working copy that shows (!) on all the files you had modified since your last commit. And fixes your lock issue.

Upvotes: 1

Related Questions