Setting up a local Subversion server/repository and resolving the resulting errors

First of all, if you are developing code, you should be using version control. What you use is up to you. I have a love hate relationship with SVN, but I also use SVN and CVS.

Setting up the initial SVN server and repository is easy if you are running Ubuntu Linux like I am. Check out these great instructions:

However, after setting up you may get errors along the lines of the following when trying to commit to your new repo: Cant open file txn-current-lock permission denied
You may also have a problem with locks if you don't use sudo or if you tried to commit as root in the repo and then later tried to commit as a normal user
The way to solve this issue is to change the ownership on the repository and all of its subdirectories to be owned by subversion and not by root. Assuming you setup the group/user svn as recommended in the link above then you would issue the following command to now own the directories as yourself.
sudo chown youruser.youruser /var/svn/repos -R
Whereas youruser is replaced by whatever your username is.

Add new comment

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Comment using an existing account (Google, Twitter, etc.)