Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set up access control in SVN?

I have set up a repository using SVN and uploaded projects. There are multiple users working on these projects. But, not everyone requires access to all projects. I want to set up user permissions for each project.

How can I achieve this?

like image 791
user15425 Avatar asked Sep 17 '08 09:09

user15425


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.

How do I give permission to a folder in svn?

If you have control over the filesystem in the svn server and that filesystem is ACL capable (for example ext3/4) you can turn on ACLs to have a grain control over the permissions of you svn tree. The directory folder3 will store the permissions for both groups which cannot be done with default unix permissions.


1 Answers

In your svn\repos\YourRepo\conf folder you will find two files, authz and passwd. These are the two you need to adjust.

In the passwd file you need to add some usernames and passwords. I assume you have already done this since you have people using it:

[users] User1=password1 User2=password2 

Then you want to assign permissions accordingly with the authz file:

Create the conceptual groups you want, and add people to it:

[groups] allaccess = user1 someaccess = user2 

Then choose what access they have from both the permissions and project level.

So let's give our "all access" guys all access from the root:

[/] @allaccess = rw 

But only give our "some access" guys read-only access to some lower level project:

[/someproject] @someaccess = r 

You will also find some simple documentation in the authz and passwd files.

like image 56
Stephen Bailey Avatar answered Sep 30 '22 06:09

Stephen Bailey