笨笨的SVN权限管理

博主在管理一个小项目时初次尝试SVN权限设置,发现其不同于以往的分配方式,而是通过收回权限进行管理。管理员具有读写权限,所有团队成员只有读权限。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近带着几个小伙伴干了个小项目,之前在公司都是svn的使用者,非管理者,所以就想借着干这个小项目顺便学svn的管理。

以往的感觉都是权限是分配出去的。但是折腾了几天svn管理以后,发现svn的权限是以收回的方式来管理的,真是有够笨笨的。

### 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
mu_group = zhangsan,xuqinmin
ddu_group = zhangsan,zhangming
au_group = zhangsan,panrenping
agu_group = zhangsan
sa_group = zhangsan,xuqinmin,tianliwei
su_group = zhangsan,zhangming
db_group = zhangsan,lixin
test_group =zhangsan,wangliguo
nmc_group = zhangsan,lizengqiang
all_staff = zhangsan,panrenping,xuqinmin,zhangming,wangliguo,lixin,lizengqiang


# [/foo/bar]
# harry = rw
# &joe = r
# * =

#让张三和administrator有对整个库的读写权限,其他用户是读权限
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]

administrator =rw

@all_staff = r


</pre><pre code_snippet_id="1687860" snippet_file_name="blog_20160518_5_2857133" name="code" class="plain">
#在Requirement目录中先把读写权限都分配出去
[/01.Requirement]
chenxiaotian = rw
administrator = rw
@mu_group = rw
@au_group = rw
@ddu_group = rw
@agu_group = rw
@su_group = rw
@sa_group = rw
@db_group = rw
@nmc_group = rw
@test_group = rw
* =

#然后逐个收回,比如mu目录下只让张三和mu小组的人有读写权限,其他人的都收回
[/01.Requirement/mu]
@mu_group = rw
@nmc_group =
@au_group =
@ddu_group =
@agu_group =
@su_group =
@sa_group =
@db_group =
@test_group = r
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">上面的这个authz文件中注释写明了svn权限的工作原理</span>


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值