Posted by Brian @ 8:48 am on September 13th 2011

Fixing the svn txn-current-lock Permission denied error in Subversion

I was setting up a new subversion repo recently in Ubuntu. I was able to check out files but when I tried a commit I hit this error:
svn: Can't open file '/var/svn/foo/db/txn-current-lock': Permission denied

So it was obviously a permissions issue, and here’s what the permissions looked like on that file:

-rwxr----- 1 root svn 0 Aug 12 18:00 txn-current-lock

Oops – I could only read but not write that file. Looking further it turns out the entire repo only had root write permissions, even though it was owned by the ‘svn’ group – I’m not sure how that happened, possibly a stupid mistake on my part. I had already set up a ‘svn’ group and added the users I wanted to have access to the repo to the ‘svn’ group, so I just had to make the repo writable by the group.

The fix was simple:
sudo chmod -R g+w /var/svn/foo/*
(where foo is the name of the repo)


  1. I spend one hour with this issue. 🙂 I forget to logout/login with my modified group membershipment…
    sudo usermod -a -G svn-user my-user
    login again

    Comment by Brown — September 1, 2012 @ 3:36 am

  2. This solution worked for me! Thanks

    Comment by Jeffrey — October 4, 2013 @ 10:09 am

  3. It worked! perfect!

    Comment by Thirumeninathan — January 11, 2015 @ 10:29 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.