-1

I tried to install svn on my ubuntu, but I have now a permission problem when I try to commit a project :

svn: E204899: Can't get exclusive lock on file '/home/svn/db/txn-current-lock': /home/svn/db/txn-current-lock (Permission denied)

Here are the steps I followed in order to install SVN (using the doc https://doc.ubuntu-fr.org/subversion)

I have created a user :

sudo addgroup svn --system
sudo adduser svn --system --home /home/svn --ingroup svn

Then, I have created the repo :

sudo -u svn svnadmin create /home/svn

Here are the files I have modified in the svn conf folder :

svnserve.conf:

[general]
anon-access = none
auth-access = write
password-db = passwd
realm = svn

And passwd file :

[users]
svn = svnpass

as the svn system user I have created before does not seem to have a password, I have tried this too :

[users]
svn =

I have created the init.d script like they show in the document (replacing the custom values) and launch it using

sudo /etc/init.d/svnserve start

or tried too using :

sudo -u svn /etc/init.d/svnserve start

The server seems to be launched well as I can see the process using ps command.

In Eclipse, I can add the repo location, it works. But when I try to commit a project, I have the error indicated above. I have tried using svn user with and without a password.

All the files in /home/svn belong to svn:svn (even the txn-current-lock file)

Does anyone have an idea of the problem ?

Thank you !

wyllyjon
  • 505
  • 1
  • 5
  • 20
  • The problem is with file system permissions, not svn configuration. – bahrep Jul 21 '16 at 11:49
  • Possible duplicate of [SVN - Permission Denied](http://stackoverflow.com/questions/960241/svn-permission-denied) – bahrep Jul 21 '16 at 12:40
  • I saw this post, but it hasn't helped me as it was using apache and there was a specific selinux right problem. – wyllyjon Jul 21 '16 at 12:54
  • it does not really matter in this case whether it's apache or `svnserve`, the problems is with insufficient permissions. – bahrep Jul 21 '16 at 12:55
  • Yes, I understand the problem, and in the case of the other post, it was the problem of the user apache not having rights on the repo. But in my case, it seems that I am using the same user everywhere. That is why I don't understand this right problem... – wyllyjon Jul 21 '16 at 13:03

1 Answers1

0

The problem is that the user account used to run the server does not have permissions to the repository /home/svn/.

Read the documentation.

bahrep
  • 29,961
  • 12
  • 103
  • 150
  • In the init.d script, I have this line : /sbin/start-stop-daemon --start --chuid svn:svn --exec /usr/bin/svnserve -- -d -r /home/svn. I start the deamon with the right user, no ? – wyllyjon Jul 21 '16 at 12:27
  • Moreover, I tried to launch the script with the right using : sudo -u svn /etc/init.d/svnserve start – wyllyjon Jul 21 '16 at 12:28
  • You have to provide this user with permissions to /home/svn and make it an owner of this path – bahrep Jul 21 '16 at 12:31
  • Yep, but the user which runs the server is *svn* if I understand well the code. And /home/svn and all the svn folders/files belong to *svn* user – wyllyjon Jul 21 '16 at 12:33