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?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With