vi /data/svn/repos/conf/passwd
修改完之后的内容如下:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
### 在下面添加用户和密码,每行一组username = password
[users]
# harry = harryssecret
# sally = sallyssecret
###===========下面是我添加的用户信息========#######
iitshare = password1
itblood = password2
5、开始设置authz. 用户访问权限
vi /data/svn/repos/conf/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]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
###--------------------下面我新加的------------------------###
###屏蔽掉上面的[groups] 因为在下面添加了
[groups]
devteam = iitshare, itblood #devteam 项目组包括两个用户iitshare,itblood
[/]
iitshare = rw
itblood =
[tshop:/tb2c]
@devteam = rw
itblood =
[tshop:/tb2b2c]
@devteam = rw
itblood = r
其中,1个用户组可以包含1个或多个用户,用户间以逗号分隔。
说明:
devteam = iitshare, itblood #devteam 项目组包括两个用户iitshare,itblood
[/]
iitshare = rw #iitshare 对根目录有读写权限
itblood = #itblood 对根目录没有任何权限
####如果需要配置tb2c、tb2b2c项目的权限,前提条件是tshop仓库下面需要有这两个项目
####如果没有的话,tshop都将不能访问
[tshop:/tb2c] #对tshop仓库的tb2c项目进行权限控制
@devteam = rw #控制 devteam 组对tb2c项目有读写权限
itblood = #限制 itblood 所有权限,其它用户有读写权限
[tshop:/tb2b2c] #对 tshop: 仓库的 tb2b2c 项目进行权限控制
@devteam = rw #限制 devteam 组对tb2b2c项目有读写权限
itblood = r #限制 itblood 只有读权限,其它用户有读写权限