[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to restrict access to repository directory?

From: Paul Koning <pkoning_at_equallogic.com>
Date: 2006-01-23 16:06:30 CET

>>>>> "Ron" == Ron Avriel <ravriel@hotmail.com> writes:

 Ron> Hi, How can I restrict write access to a repository directory
 Ron> (and its files and directories) to specific users?

 Ron> I tried using svnperms.py and and commit-access-control.pl from
 Ron> the pre-commit hook, but I couldn't get any of them to work
 Ron> right.

 Ron> For svnperms.py I configured svnperms.conf:
 Ron> -------------------------------------
 Ron> trunk/.* = *(add,remove,update)
 Ron> trunk/restricted.* = admin(add,remove,update)
 Ron> -------------------------------------

 Ron> but with this configuration everyone had write accesses to
 Ron> trunk/restricted.

svnperms.py says that the last match wins. In the rule you gave, an
access to trunk/restricted.* will match both lines. The first line
gives a rule for everyone. The second line overrides that ONLY for
admin. For non-admin, it doesn't give a rule. So the previous rule
is still in effect.

What you need is this for the second line:
 trunk/restricted.* = *(),admin(add,remove,update)

That way your second line now says "everyone has no access -- except
admin who has full access".

By the way, I looked at both the Perl and Python based access controls
and ended up using the Python one because it seemed easier to use.

    paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jan 23 16:19:36 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.