svnapache2mod-dav-svn

dav_svn: extra user for one repository


I have some svn repository served by apache with mod dav_svn. Permission are so far managed for all repositories via http basic auth. Now i need to grant one user access to a repostory. What would the easiest way to achieve this be?

I tried to add the repository as another location in the config with its own passwd file but that didn't work out.

<Location /svn>
  DAV svn
  SVNParentPath /var/svn
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile [tothefile]
  Require valid-user
  SSLRequireSSL
</Location>
<Location /svn/subrepo>
  DAV svn
  SVNParentPath /var/svn/subrepo
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile [toanotherfile]
  Require valid-user
  SSLRequireSSL
</Location>

Can i somehow easily achieve this without using authz or needing a separate location entry for every repository?


Solution

  • The Right Way (tm) is using Path-Based Access Control anyway, i.e. you'll use single <Location>, in which have

    AuthzSVNAccessFile /path/to/repo/authz
    

    and authz-file added with special section(s) for repository and access-rule for special user