SVN permission denied - txn-current-lock

Marwelln picture Marwelln · Dec 10, 2011 · Viewed 71.7k times · Source

I have just set up svn on my ubuntu server. I have a my user I can login to. The problem is that whenever I try to make a change on the file structure I get a permission denied error.

Can't open file '/var/www-svn/db/txn-current-lock':
Permission denied

My repo is in /var/www-svn and the permission on that folder is drwxr-xr-x for user AND group svn (I am bad with permissions so I don't know if that's correct). My user that I log in to on svn is in the svn group, yet I cant change the file structure. What am I doing wrong? It works if I change the user and group of the folder to my user that I login too.

In svnserve.conf, anon-access is set to none and auth-access is set to write.

(I changed the owner of /var/www-svn by typing sudo chown -R svn:svn www-svn inside /var directory.)

Answer

Aleksandar Pavić picture Aleksandar Pavić · Oct 8, 2014

Repository folder on file system must be owned or at last to have read/write permission by the same linux user that your svn or apache via web-dav is working on...

In my case it was:

$ chown -R www-data:www-data /svn/reponame

But in some other case, it might be different, like

$ chown -R someuser:somegroup /svn/reponame

So replace someuser:somegroup with proper values.