Read-only user configuration for SVN-Apache

I followed the directions in a book called Version Control with Subversion regarding the correct way to configure Apache-based SVN configurations. So far, I have the file "subversion.conf" in my directory "/etc/httpd/conf.d". In this file, I defined a location called "/ svn" and matched it with the location of my subversion repositories "/ x1 / svn / (repo1), (repo2), (etc.)". For wit - I also created the user "svn" who owns the repository area and added group permissions for Apache, so repositories are accessible from Apache without having to install everything that belongs to Apache (which I think is a strange way to do things).

Anyway. Here is the problem I am facing. I would like to set up a “user” that I can pass on to people if I want to allow them to download a copy of the source code for a specific repository code base. There are several difficulty levels.

  • A) allow them a common user who provides read-only access to all repositories
  • B) provide specific read-only users for specific repositories

In any case, and I think it would be easier to explain how to execute option (A), how can I do this, given the configuration that I have configured for my web server currently? The following is a copy of my subversion.conf file, which works very well, but requires that any user with access to the desired repositories have full access:

   <Location /svn>
   DAV svn
   SVNParentPath /x1/svn

   # Require SSL connection for password protection.
   # In order to do this Apache needs to use a self-signed certificate
   # Talk to Cordel and/or consult Apache Docs and OpenSSL docs
   # SSLRequireSSL

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/svn-auth-file
   Require valid-user
   </Location>

- , , SVNParentPath ( A)? - ( B). , .

, , "", , SVN/Apache. , , GET - GET ( ), POST - , . , , A-Hole GET . . - ?

!

+5
1

Path Based Authorization, , :

[/]
username = r

[repo1:/]
username = r

[repo2:/]
username = r

Apache:

LoadModule authz_svn_module path/to/mod_authz_svn.so
...
AuthzSVNAccessFile /path/to/access/svnaccess
+7

All Articles