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)

