3

I've installed a SVN server and configured a repository inside it. It is accessible by Apache. I've allowed access to 3 users, here are the repository conf files:

[root@afdev conf]# egrep -v '^#' *
authz:
authz:[aliases]
authz:
authz:[groups]
authz:
authz:
authz:allaccess = vladimirc,antonc,oleksiyd,itaig
authz:
authz:[/]
authz:@allaccess = rw
passwd:
passwd:[users]
passwd:antonc = XXX
passwd:oleksiyd = XXX
passwd:vladimirc = XXX
passwd:itaig = XXX
svnserve.conf:
svnserve.conf:
svnserve.conf:[general]
svnserve.conf:anon-access = none
svnserve.conf:auth-access = write
svnserve.conf:password-db = passwd
svnserve.conf:authz-db = authz
svnserve.conf:realm = kiev_repo
svnserve.conf:
svnserve.conf:[sasl]
[root@afdev conf]# 

But for some reason which I can't find, when I browse to http://svn_server/svn/repo I get asked to enter a password and when I enter credentials of one of the specified above users, the password window pops up again like the credentials are not accepted. After editing the files in the repo conf directory I did service svnserve restart ; service httpd restart but it seems like the users are still unable to log into the SVN repository. What could be wrong? What have I missed?

Wesley
  • 32,320
  • 9
  • 80
  • 116
Itai Ganot
  • 10,424
  • 27
  • 88
  • 143
  • Have you tried using an svn client, or are you just using a web browser? – blee Dec 17 '13 at 10:35
  • I've tried a web browser and locally from the server using one of the specified users credentials. – Itai Ganot Dec 17 '13 at 10:36
  • After editing these files, shall I run `service svnserve restart` or any other command to reflect the changes I did in the configuration files? – Itai Ganot Dec 17 '13 at 11:45
  • So is it svnserve or Apache HTTP Server? If you use Apache, then you don't need to configure svnserve at all. – bahrep Dec 17 '13 at 15:04
  • Okay, good to know, I've also tried adding user using `htpasswd -c /path/to/.htpasswd-users user1` but this user is not able to log into the SVN server as well, am I missing anything? – Itai Ganot Dec 17 '13 at 15:09

1 Answers1

2

I've found the problem and fixed it. It seems like the file which holds the users and encrypted password is /etc/svn-auth-users rather than the passwd file in the repo/conf directory. I used htpasswd -m /etc/svn-auth-users user1 , set a password and then I was able to log into the SVN server using http://svn_server/repo with the newly created credentials. I still don't understand why the /home/svn/repo/conf/passwd file is being ignored and /etc/svn-auth-users is used but since everything works now and my users are able to log into the SVN server - I have no complains.

Itai Ganot
  • 10,424
  • 27
  • 88
  • 143
  • In regards to it ignoring the conf/passwd file, check the SASL setting in your svnserve.conf. If it's enabled, it overrides the passwd-db setting. – drifter Apr 09 '15 at 16:45