How to configure svn authz on Windows?

3.4k views Asked by At

We would like to start two new development projects: Project1 and Project2. We have two groups of developers:

  • GroupA should have full (read + write) access to both projects, and
  • GroupB should have no access to Project1, but full access to Project2.

I followed Jeff Atwood's tutorial and successfully installed subversion 1.7.6 on Windows Server 2003 as a Windows service. I tested the system by adding folders and files, and commiting changes, and everything worked as it should (the client was TortoiseSVN 1.7.9).

Unfortunately, I couldn't figure out how I could configure the access rights of our developer groups in authz. The developers can connect to the server, but get Authorization failed messages when try to commit something.

Thank you for your help in advance.

1

There are 1 answers

2
bahrep On BEST ANSWER

I advise you to read the SVNBook (Version Control with Subversion). Please see the chapter which describes the path-based authorization. I think that the chapter answers your question.

The sample authz file is provided below. Please note that I don't explicitly set 'no access' rule for GroupB on /repo/Project1 repository directory. I set 'no access' to the root node for 'everyone' and then this permission gets inherited by it's child items unless you explicitly provide access to a folder or a file.

[/]
*=

[groups]
GroupA=john,sally
GroupB=harry,george

[repo:/Project1]
@GroupA=rw

[repo:/Project2]
@GroupA=rw
@GroupB=rw

I'd like to note that you can drastically simplify the process of managing SVN user permissions if you use VisualSVN Server Manager.

It provides comfortable UI to manage user permissions which you can find really helpful:VisualSVN Server Manager

Update 2016

To manage access rules for SVN repositories hosted on VisualSVN Server you can now use PowerShell cmdlets packaged with VisualSVN Server. Beginning with version 3.4, VisualSVN Server includes PowerShell module that should help you with this task. The cmdlets you are looking for are

Read the article KB88: VisualSVN Server PowerShell Cmdlet Reference for the complete list of VisualSVN Server PowerShell cmdlets.