apache+svn权限管理实例

news/2025/2/25 16:06:52
http://abc.scmlife.com/viewthread.php?tid=17700&highlight=
apache+svn权限管理实例
看了很多同学对权限管理的困惑,自己将实际操作方案放上来,供大家参考:
首先介绍下我们的环境:我们的SVN服务器是LINUX的操作系统

方法一
例子:
在服务器端192.168.2.22的/opt/repository下建test1和test2两个库,权限和用户文档统一
步骤如下:
1,建库
svnadmin create /opt/repository/test1
svnadmin create /opt/repository/test2

2,配置httpd
<Location /opt>
  DAV svn
  SVNParentPath /opt/repository/
  AuthType Basic
  AuthName "Subversion repository "
  AuthUserFile /opt/repository/passwd
  AuthzSVNAccessFile /opt/repository/authz
  Require valid-user
</Location>



解释:
用户访问test1的方式为:
http:// 192.168.2.22/opt/test1
用户访问test2的方式为:
http:// 192.168.2.22/opt/test2

3,则passwd 为用户列表文档
     authz 为用户权限管理文档

4,用户权限文档authz
在用户权限文档中,格式如下:

[groups]
t1=a
t2=b,c
t3=d,e

[test1:/]
*=r
@t1=rw
[test1:/back]
@t2=rw

[test2:/]
*=r
@t2=rw
[test2:/ca]
@t3=rw
@t1=none


解释:
对于test1库来讲:
1,        a具有所有目录的读写权限
2,        b,c对于back目录下的具有读写权限,对其他目录只有读权限
3,        d,e对所有目录只有读权限

对于test2库来讲:
1,        b,c具有所有目录的读写权限
2,        d,e对于ca目录具有读写权限,对其他目录只有读权限
3,        a 没有ca 目录的任何权限,但对其他目录有读权限



方法二:
例子:
在IP 地址为192.168.2.22的/opt/repository下建test1和test2两个库,权限和用户文档分开管理

步骤如下:
1,建库
svnadmin create /opt/repository/test1
svnadmin create /opt/repository/test2

2,配置httpd
<Location /test1>
  DAV svn
  SVNPath /opt/repository/test1
  AuthType Basic
  AuthName "Subversion repository test1"
  AuthUserFile /opt/repository/testconf/passwd1
  AuthzSVNAccessFile /opt/repository/testconf/authz1
  Require valid-user
</Location>

<Location /test2>
  DAV svn
  SVNPath /opt/repository/test2
  AuthType Basic
  AuthName "Subversion repository test2"
  AuthUserFile /opt/repository/testconf/passwd2
  AuthzSVNAccessFile /opt/repository/testconf/authz2
  Require valid-user
</Location>

解释:
用户访问test1的方式为:
http:// 192.168.2.22/test1
用户访问test2的方式为:
http:// 192.168.2.22/test2


注:<Location /test1>也可设成<Location  /opt/test1>
则相应访问方式可以为:http:// 192.168.2.22/opt/test1



3,则对于库test1来讲用户列表文档为/opt/repository/testconf/passwd1
                  权限文档为/opt/repository/testconf/authz1
对于库test2来讲用户列表文档为/opt/repository/testconf/passwd2
                  权限文档为/opt/repository/testconf/authz2

然后分别修改文件即可


我们目前实际操作用的是方法2,即各个库对应自己的权限文档。

希望对大家有点用。

转载请注明源自www.SCMLife.com,请保留版权. 本贴地址:http://abc.scmlife.com/viewthread.php?tid=17700

 


http://www.niftyadmin.cn/n/2970591.html

相关文章

C# 基础知识

一、 C# 复制代码 // compile with: /target:library public class D {public virtual void DoWork(int i){// Original implementation.} }public abstract class E : D {public abstract override void DoWork(int i); }public class F : E {public override void DoWork(int…

巧解jquery及其插件一些bug

在开发傲游新浪微博插件中&#xff0c;使用jquery遇到一些问题&#xff0c;原因和解决方法如下。 1、thickbox的参数问题 在thickbox的例子中&#xff0c;以inline方式调用&#xff0c;形式如#TB_inline?height300&width300&inlineIdmyOnPageContent。 但是发现这样调…

【转载】项目级别配置管理员的职责

http://abc.scmlife.com/viewthread.php?tid17178&highlight

软考成绩出来了

软考成绩出来了.上午:49下午:64这个成绩应该是过了.我手上还有个网工呢,过去的时光对我来讲确实有点辛苦,但是以后应该更加努力才是.有一点点奖励,我都会很开心^_^转载于:https://www.cnblogs.com/splyn/archive/2009/08/04/1538783.html

easyui datagrid url不请求请求_浅谈url

url的组成部分主要有&#xff1a;协议&#xff0c;域名&#xff0c;路径&#xff0c;查询参数&#xff0c;锚点协议http协议和https协议http协议默认端口好80https协议默认端口号443域名每个域名都对应一个ip&#xff08;internet protocol网络协议&#xff09;每个上网的设备都…

【转载】JNDI 连接Windows Active Directory 教程

這編主要是描述 Java JNDI 連 Windows Active Directory 的教程.包括認證, 新增用戶, 修改密碼 及 取得用戶資料. 作者原文:http://blog.matrix.org.cn/joeyta/entry/20070302 開始教程:1. 建立 IIS SSL2. 將 CA Certificate 加入至 jre keystore 裡3. JNDI 連 AD1. 建立 IIS …

分享dbms的好助手:sql助手(Sql Assistant)

重装了sql 2005&#xff0c;发现management studio没有了智能提示&#xff0c;网上搜了一个插件。安装并试用了一下&#xff0c;功能果然很强大&#xff0c;最重要的是很好用&#xff0c;很符合操作习惯。和大家分享一下。下载链接&#xff1a;Sql Assitant转载于:https://www.…

【转载】Java组件开发:一个概念框架

http://www.matrix.org.cn/resource/article/2005-10-26/Java_Component_Developmen_43899.html Java组件开发的一个概念框架 作者:Palash Ghosh 译者: kelvincheng 版权声明&#xff1a;任何获得Matrix授权的网站&#xff0c;转载时请务必以超链接形式标明文章原始出处和作者…