svn精细配置各个目录的权限

来源:互联网 发布:易推营销软件 编辑:程序博客网 时间:2024/05/22 07:43

转载自:http://blog.csdn.net/cuiyaoqiang/article/details/51784391

这里写图片描述

如图,这里我建的项目库为BHPP,其下边又有两个文件夹BHPPB和BHPPH,在BHPPB下又有9个文件,现在要分别对每个文件进行svn权限配置。 
要求:

  • admin管理员对所有的文件都有读写权利;
  • assembly文件夹对zs有读写权利,其他人只能读;
  • bcommon文件夹对ls有读写权利,其他人只能读;
  • ……
  • rsserver文件对cyq有读写权利,其他人只能读;
  • hy和wz只有读的权利,不能写。 
    关于项目上传这里不做介绍。 
    svnserver.conf中主要放开对以下的注释,注意每行左边没有空格。
anon-access = noneauth-access = writepassword-db = passwdauthz-db = authz
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

passwd,创建用户及密码

[users]admin=adminzs=zsli=licyq=cyqcxx=cxxlh=lhmg=mghy=hywz=wz
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

authz,权限配置

### This file is an example authorization file for svnserve.### Its format is identical to that of mod_authz_svn authorization### files.### As shown below each section defines authorizations for the path and### (optional) repository specified by the section name.### The authorizations follow. An authorization line can refer to:###  - a single user,###  - a group of users defined in a special [groups] section,###  - an alias defined in a special [aliases] section,###  - all authenticated users, using the '$authenticated' token,###  - only anonymous users, using the '$anonymous' token,###  - anyone, using the '*' wildcard.###### A match can be inverted by prefixing the rule with '~'. Rules can### grant read ('r') access, read-write ('rw') access, or no access### ('').[aliases]# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average[groups][/]# 表示admin有读写的权限admin=rw# *=r表示其他人只能读*=r # 此处注意是/BHPP/BHPPB,和创建的文件结构对应,如果不对应会造成只有根目录中# 的配置有效,其他的提示权限不够的错误[/BHPP/BHPPB]admin=rw*=r[/BHPP/BHPPH]admin=rw*=r[/BHPP/BHPPB/frame]admin=rwls=rw*=r[/BHPP/BHPPB/docmngt]admin=rwls=rw*=r[/BHPP/BHPPB/fwebcommon]admin=rwls=rw*=r[/BHPP/BHPPB/bcommon]admin=rwls=rw*=r[/BHPP/BHPP/BHPPB/rsserver]admin=rwcyq=rw*=r[/BHPP/BHPPB/cmeramngt]admin=rwcxx=rw*=r[/BHPP/BHPPB/hrmngt]admin=rwmg=rw*=r[/BHPP/BHPPB/finmngt]admin=rwlh=rw*=r[/BHPP/BHPPB/assembly]admin=rwzs=rw*=r