Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent a subversion user accessing part of the repository?

I'm using a Subversion repository hosted on Dreamhost for a project.

I would like to allow access to some users on a restricted basis. At the very least I would like to allow read-only access to some users, but ideally I would like to prevent some users seeing some parts of repository at all. I can't find user permissions mentioned in the web docs for Subversion though I assume it is there?

I'm used to using Perforce, so what I want is what p4 protect does for Perforce.

Thanks.

like image 868
dave Avatar asked Feb 18 '09 20:02

dave


People also ask

How do I restrict access in SVN?

As @jpierson already answered, you can use authz files to define No Access, Read Only or Read Write rules on repository paths. Repository path can represent repository root and any path within repository. I.e. you can specify access rules not only subtrees (folders) but files as well.

What is Subversion control system?

Subversion is used for maintaining current and historical versions of projects. Subversion is an open source centralized version control system. It's licensed under Apache. It's also referred to as a software version and revisioning control system.


1 Answers

Have a look at the authz file in the conf/ directory. You can set permissions for specific users and specific directories. In svnserve.conf you can specify if anonymous users have read access or not.

Here's an example from a repository of mine:

[groups]
project1_team = dave, john, andy

[/]
* =
dave = rw

[/project1]
@project1_team = rw

[/project2]
andy = r

What's happening here is that I defined a group of users having full access to project1; dave (which happens to be me) has full access to the entire repository, while andy has read-only access to project2.

like image 184
UncleZeiv Avatar answered Oct 02 '22 16:10

UncleZeiv