Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 355
Myth1c Avatar asked May 15 '12 19:05

Myth1c


4 Answers

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
like image 97
Greg Desmarais Avatar answered Sep 22 '22 05:09

Greg Desmarais


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.

like image 27
Ari0nhh Avatar answered Sep 21 '22 05:09

Ari0nhh


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.

like image 43
Doug Chamberlain Avatar answered Sep 24 '22 05:09

Doug Chamberlain


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.

like image 27
Fritz W Avatar answered Sep 20 '22 05:09

Fritz W