You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Miguel Rentes <mi...@efacec.pt> on 2008/02/18 18:08:21 UTC

Subversion file-based authorization

Hi everyone,

Is there a way of ensuring that only a user (or a group of users) can 
change a specific file in a given directory? For example, suppose I have 
these files on a given directory:

- abc.c
- abc.h
- vernum.h

and I want user harry to change vernum.h but not abc.c or abc.h. All 
other users except harry can change abc.c or abc.h. Is there a way to 
change the authz file to put this kind of authorization?

Best regards,



-- 

Miguel Rentes
/Software Engineer/
EFACEC - Sistemas de Electronica, SA
/ID/GR/
*Address:*
Rua Eng. Frederico Ulrich apartado 3078
4471-907 Moreira da Maia - Portugal
*Phone: *+351 22 940 20 00 (DDI: 22 940 33 88)
*Fax: *+351 22 948 54 28
*Email: *miguel.rentes@efacec.pt <ma...@efacec.pt>
*Disclaimer* <http://efacec.pt/email.jpg>

Re: Subversion file-based authorization

Posted by Andy Levy <an...@gmail.com>.
On Feb 18, 2008 1:08 PM, Miguel Rentes <mi...@efacec.pt> wrote:
>
>  Hi everyone,
>
>  Is there a way of ensuring that only a user (or a group of users) can
> change a specific file in a given directory? For example, suppose I have
> these files on a given directory:
>
>  - abc.c
>  - abc.h
>  - vernum.h
>
>  and I want user harry to change vernum.h but not abc.c or abc.h. All other
> users except harry can change abc.c or abc.h. Is there a way to change the
> authz file to put this kind of authorization?

Subversion's built-in authorization only provides directory-level
control. To get finer-grained control (and to gain the ability to use
wildcards), look into the svnperms.py pre-commit hook script.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Subversion file-based authorization

Posted by km...@rockwellcollins.com.
Miguel Rentes <mi...@efacec.pt> wrote on 02/18/2008 12:08:21 PM:
> Hi everyone,
> 
> Is there a way of ensuring that only a user (or a group of users) 
> can change a specific file in a given directory? For example, 
> suppose I have these files on a given directory:
> 
> - abc.c
> - abc.h
> - vernum.h
> 
> and I want user harry to change vernum.h but not abc.c or abc.h. All
> other users except harry can change abc.c or abc.h. Is there a way 
> to change the authz file to put this kind of authorization? 

The authz file only has directory granularity.  However, if
you only need to restrict write access (not read), you could
write a hook script to disallow the write based upon the path
and username combo.

The svnperms.py script works as a hook script, and supports
regex for the paths, so it might work.  (Just never tried
it for individual files.)

Kevin R.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org