SVN权限分配
来源:互联网 发布:软件性能测试报告案例 编辑:程序博客网 时间:2024/06/05 08:10
SVN 版本管理工具笔记:
一.配置笔记:
二.工具随笔:
三.本地目录笔记:
四.创建版本库命令行记录:
group权限设定:
下面我们就来介绍一下这三个文件的作用格式什么。
首先,我们介绍passwd这个文件。
用你习惯的文本编辑器打开这个文件,你会看到一些使用“#”注释掉的说明,其中关键的就是在[users]下面,有
# harry = harryssecret
# sally = sallyssecret
样的样板代码,意思就是有两个用户,其中一个的用户名叫“harry”,密码为“harryssecret”,而另一个用户名为“sally”,密码为“sallyssecret”。我们接下来为我们的测试下面添加一些用户,这样方便我们下面的说明。比如,我要添加三个用户,一个叫做“nicholas”,密码为“nicholas”,第二个用户名为“friend”,密码为“friend”,第三个为“stranger”,密码为“strangers”。
代码如下:
nicholas = nicholas
friend = friend
这样,我们就添加好了三个认证用户。
### 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.
[users]
# harry = harryssecret
# sally = sallyssecret
nicholas = nicholas
friend = friend
stranger = stranger
同样打开这个文件,你会看到一些注释掉的语句,
# [groups]
# [/foo/bar]
# [repository:/baz/fuz]
在之前,我们一共建立三个用户,nicholas,friend和stranger,我们现在设想一下我们的组情况,假设我们希望nicholas和friend在开发组中,这两个用户具有读和写的权力,而用户stranger在测试组中,只具备读的权力。那么我们该如何来控制这个权限呢?看看下面的代码:
我们先在[groups]标记下面,输入组的名称:
到目前为止,我们已经为三个用户分好了用户组,其中nicholas和friend在dev_group中,而stranger则在test_group中。
下面,我们为两个组来分配权限。
首先我们要为这两个组所能访问的工程做一个规定,正如在之前的文章《Eclipse中使用Subversion进行版本控制》中,曾经向版本参考提交了一个名为“TestSVNProj”的项目,下面我就假设刚刚建立的两个用户组都需要最这个工程进行操作。
我们在authz文件中,写下[TestSVNProj],这个是指定我们下面将对TestSVNProj项目进行定义。
我们使用如下代码:
@dev_group = rw
@test_group = r
这就定义了,对TestSVNProj项目,dev_group用户组可以进行读,写操作,而test_group用户组则只具备读的权限。
为了阻止其他用户组对这个文件有读的权力,我们可以再添加一句:
* =
这个语句就是指定其他的用户组的权力为空,也就是没有权力。
### 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, to a group of users defined in a special [groups]
### section, or to anyone using the '*' wildcard. Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[groups]
# harry_and_sally = harry,sally
dev_group = nicholas,friend
test_group = stranger
# [/foo/bar]
# harry = rw
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/TestSVNProj]
@dev_group = rw
@test_group = r
* =
最后,我们在来说说这个svnserve.conf文件,打开这个文件,我们就可以看出这个是Subversion权限配置的主文件,类似于读取相关信息的枢纽。
为了让我们刚刚配置的两个文件(passwd和authz)起作用,我们需要去掉password-db = passwd和authz-db = authz前面的注释符“#”,让Subversion知道要从上面两个文件中读取相关信息。
当然,你也可以指定其他的认证文件,写法如下:
authz-db = ..\..\authz
以此类推。
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = none
# auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory. If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
- SVN权限分配
- SVN权限分配
- svn权限分配
- SVN权限分配
- ERP笔记4-SVN目录的权限分配
- SVN的学习之路五(权限分配)
- 权限分配
- 权限管理--------分配权限
- SVN权限
- SVN快速上手(二)权限分配,控制到每个目录
- SVN(VisualSVN )详细教程(六)--建立用户和组,并且需要分配权限
- CentOS6.8 安装SVN服务器以及用户分组和权限分配
- svn--5.svn权限
- 关于系统权限分配
- RFC权限分配
- 关于MySQL权限分配
- mysql分配权限
- RFC权限分配
- Apache_ActiveMQ教程
- Ubuntu开机黑屏或花屏解决办法
- windows编程
- 查看linux系统是32位还是64位的方法
- CXF+Spring+Websphere7.0
- SVN权限分配
- X264的时耗分析
- C#正则表达式
- Apache ActiveMQ学习笔记【mq的方式有两种:点到点和发布/订阅】
- Android App 开发 设计模式第四篇:工厂方法模式
- 周鸿祎奋斗记
- 银行核心系统软件开发
- CentOS使用minimal安装后,无法使用SCP
- 从30岁到35岁:为你的生命多积累一些厚度