SVN - how to restrict user access to certain folders?

I have an SVN repository wherein I need to give a particular user read/write access to several specific folders. Access to the folder and its children is OK, but accessing the folder's parent is not OK.

Also, it's actually 2 separate folders I need this user to access -- and these 2 folders are not part of the same tree node (but eventually they are if you go up enough levels).

I have access to SVN's /conf/authz, /conf/passwd, and /conf/svnserve.conf/ files.


Add the following text to your authz specifying a user by name for path-based authorization (<reponame> can be the name of any repository).

[<reponame>:/branches/calc/bug-142/secret]
harry =

To give Harry readonly access to the secret folder then do the following.

[<reponame>:/branches/calc/bug-142/secret]
harry = r

These will specifically deny a user from having any less restrictive inherited permissions.


Path-based authorization should help you. Authorization mechanisms are built in Apache Subversion.

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.

Read SVNBook!