I've setup a SVN repository served with Apache DAV and LDAP. Everything works smoothly when I access the respository with a user that has read/write permissions for the whole repository.
The repository has many projects and looks like this:
repo_src
\a
\b
\c
\d
.. etc..
I need to give a certain user "A" acces to a certain subdirectory "a" but not to its parent directory nor to its siblings (b, c, d, etc.)
I read the book "Version Control with Subversion" (http://svnbook.red-bean.com/en/1.6/svn-book.html#svn.serverconfig.pathbasedauthz) about path-based authorization. I did exactly what is specified there: I edited the file svn.authz with something like this:
[src_repo:/a]
A = rw
[src_repo:/]
root = rw
In Apache, the svn config file looks like this:
<Location /svn>
DAV svn
SVNParentPath /data/repos/
AuthName "Zentyal LDAP user required"
AuthType Basic
AuthBasicProvider ldap file
AuthBasicAuthoritative On
AuthzLDAPAuthoritative off
AuthLDAPURL ....
AuthLDAPBindDN ....
AuthLDAPBindPassword ...
AuthUserFile /dev/null
uthzSVNAccessFile /etc/apache2/svn.authz
require valid-user
</Location>
When I access to the subdirectory src_repo/a though the WEB interface (http://host/svn/ src_repo/a
) as user A, I can read the contents of the directory and its files. But when I try to browse the directory http://host/svn/src_repo/a
using TortoiseSVN or checkout the contents using "svn checkout http://host/svn/src_repo/a
" I get this message:
svn: E175002: Server sent unexpected return value (405 Method Not Allowed) in response to PROPFIND request for '/'
Obviously TortoiseSVN and the svn client are trying to access '/' (which is not intended).
How can I setup the svn server to allow only subdirectory access? Why the WEB access differs from the command line or TotoiseSVN access?