0
votes

Can any one help me with this confusion… I have setup SVN server correctly. My problem is with authorization & access.

I have created SVN users, through command line, using the following command

htpasswd -cm /etc/svn-auth-users harry and my dav_svn.conf file has the following -

<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>

It is evident, that user and password (encrypted) stored in /etc/svn-auth-users

Question 1. Then what is the use of the files “authz” and “passwd” inside my repo/conf/ Question 2. In my situation, as stated above (i.e., using the file /etc/svn-auth-users), how do I restrict users to a particular branch.

Note: Everywhere, I see user access is restricted using the “authz” file.

.
.
.
[my_repo:/branches/calc]
harry = rw
bobby = r
.
.
.

I even tried that, but has no effect. Any user, created using the command line above, can access trunk. Any help is highly appreciated.

1
I followed the same method as stackoverflow.com/questions/20566589/… . But when i follow the above method and access the repository I am getting svn: E170013: Unable to connect to a repository at URL , svn: E175013: Access to repo folder forbidden. can someone please help me out. - user3906723

1 Answers

0
votes

I dont see the AuthzSVNAccessFile in your apache snapshot that you have attached. You need to put the location of authz file in the AuthzSVNAccessFile apache configuration.

You have that one line missing

<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
AuthzSVNAccessFile /etc/path/authz
Require valid-user
</Location>