Subversion with Apache, Anonymous read, Auth. readwrite?
I've been following this guide (
I tried editing the svn-acl-conf file to have guests or anonymous users read access only. Since that's what I'm trying to achieve.
I've got three users now, two developers and one guest account. It works as it should, two with read write rights and one with read only.
Only I want the 'guest' account to be used without logging in via web. Is this possible or am I better off with just a normal subversion repository without Apache?
Thanks
1 Reply
<location svn="" <project="">>
DAV svn
SVNPath /srv/svn/ <project>AuthType Basic
AuthName " <project>Repository"
AuthzSVNAccessFile /srv/svn/svn-acl-conf
AuthUserFile /srv/svn/<project>.htpasswd
Require valid-user</project></project></project></location>
The block requires a valid user for any access to the /svn/
In general for read only access you need to allow GET, PROPFIND, OPTIONS, and REPORT. So we can enclose your "Require" statement inside a "LimitExcept" block.
So you should replace what you have with…
<location svn="" <project="">>
DAV svn
SVNPath /srv/svn/ <project>AuthType Basic
AuthName " <project>Repository"
AuthzSVNAccessFile /srv/svn/svn-acl-conf
AuthUserFile /srv/svn/<project>.htpasswd
# For any operations other than these, require
# an authenticated user.
<limitexcept get="" propfind="" options="" report="">
Require valid-user
</limitexcept></project></project></project></location>