Acces control using SVN "authz" and svnserve

Jaxmetalmax picture Jaxmetalmax · Sep 6, 2012 · Viewed 10.3k times · Source

I have a SVN server running on Windows

I create a repo for a project like this:

E:\SVN\WEB\MYWEB-WWW

I add in the "passwd" file the users:

[users]
admin      = qazwsx 
developer1 = 123456
developer2 = qwerty

then I edit the "authz" file:

[groups]
Admins = admin
Developers = developer1, developer2

[/]
@Admins = rw
@Developers = r
* =

my "svnserve.conf" file looks like this:

anon-access = none
auth-access = write
auth-access = read

password-db = passwd

authz-db = authz 

I check out the repo, and login with admin user and everything is fine, but when I try to do a commit with admin user it fails showing this message "Authentication failed"

I also tried without the groups using the "admin" user but the same error

Answer

David W. picture David W. · Sep 6, 2012

My gut feeling is that your svnserver.conf file has the extra auth-access = read line, and that's causing you problems.

Normally, if you set auth-access = write, it implies read too. You don't list the line twice to get both read and write access.

Think of it this way: What svnserve.conf giveth, authz file taketh away. In other words, you grant your authorized users read/write access via the auth-access = write. Then, you can limit that access via your authz file. However, if you don't grant the right in svnserve.conf in the first place, you can't grant that right in authz.