user3906723
user3906723

Reputation: 145

svn restrict specific folder repository

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.

Upvotes: 0

Views: 352

Answers (1)

Siddharth Kaul
Siddharth Kaul

Reputation: 972

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>

Upvotes: 0

Related Questions