I have created the file svn.password and added a few users.

Now I installed a Subversion repository and a Trac instance to my apache folder and set up the vhost.conf as follows:

<Location /svn>
   DAV svn
   SVNParentPath /var/www/vhosts/xyz.com/svn/
   AuthType Basic
   AuthName "SVN"
   AuthUserFile /var/www/vhosts/xyz.com/svn.password
   Require valid-user
<Location /trac/>
   SetHandler mod_python
   PythonInterpreter main_interpreter
   PythonHandler trac.web.modpython_frontend
   PythonOption TracEnv /var/www/vhosts/xyz.com/trac/
   PythonOption TracUriRoot /trac/
<Location /trac/login>

All running smoothly, I can access http://www.xyz.com/svn/repository and http://www.xyz.com/trac/ with any of the users I have added.

Now here is my problem. I would now like to limit access to certain folders within my repository for certain users. I want one repository for Trac but certain developers will only work on certain projects. So basically there is a xyz_server folder and a xyz_client folder in my ./svn/repository/.

I now change /var/www/vhosts/xyz.com/svn/repository/conf/authz and set the following:

* =
test = rw
ihaveaccess = rw

ihaveaccess = rw

I would now assume, that if I try to access http://www.xyz.com/svn/repository/xyz_client/ with the user test it would not work. Only if I tried accessing http://www.xyz.com/svn/repository/xyz_server/ I should have read and write permissions.

However I have full access to the SVN folders.

What am I doing wrong?

2 Answers 2


In your apache configuration, start by enabling mod_authz_svn module

LoadModule authz_svn_module modules/mod_authz_svn.so

Then inside <Location /svn> use the AuthzSVNAccessFile directive

AuthzSVNAccessFile /var/www/vhosts/xyz.com/svn/repository/conf/authz

  • I did so now, my vhosts.conf has the lines added, authz_svn_module was already loaded by default. However now no user has access anymore, I get a 403 Forbidden for all users. <Location /svn> DAV svn SVNParentPath /var/www/vhosts/xyz.com/svn/ AuthType Basic AuthName "SVN" AuthUserFile /var/www/vhosts/xyz.com/svn.password AuthzSVNAccessFile /var/www/vhosts/xyz.com/svn/repository/conf/authz Require valid-user </Location>
    – Dominik
    Jun 18, 2013 at 12:48

I had similar issues, but in the end the problem was not with the authentication settings on the SVN server, but with my SVN client "Tortoise" which had been caching authentication data. So in the OP's example, even if I logged in as user "test" through Tortoise, it would use the access rules for the previously logged in user "ihaveaccess". Clearing the authentication data under "TortoiseSVN --> Settings --> SavedData" worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .