Access Restriction for User in SVN

Controlling User access in Subversion

User can be restricted in SVN for the repo/branch etc via pre-commit scripts But that restriction will be only for check in (commit).
What if you want to restrict user from reading or checkout your repo/directory/branch. If you have some sensitive information in your repo(Or any other reason) which can only be accessed by set of users, Here is your solution to restrict read access to repo.

In your apache conf file you need to add following configuration.

   AuthzSVNAccessFile  /etc/apache2/conf/authz.conf

Now create file /etc/apache/conf/authz.conf and you can add configuration like

#This will give everybody access to everything by default. This has to be at top.
* = rw

#Repository restriction.
#below line will block all users.
* =
#Below line will give read access to user1 for the repo1.
user1 = r
#This will give only read and write acess for repo1 to "user2"
user2 = rw

#Restriction for a directory/branch/path
* =
user1 = rw
user2 = r

You can twik the user access restriction script as per your need.

Popular posts from this blog

Manage Docker images on local disk

Gradle or Maven - A Dilemma

Setup Docker slaves for Jenkins