您的位置:首页 > 其它

怎样设置svn中不同文件夹的权限

2009-08-28 15:47 246 查看
本文引自http://www.subversion.org.cn/bbs/viewthread.php?tid=857

关于项目中多个模块(文件夹)的权限管理问题

各位高手请帮小妹解决一下以下问题,谢谢!

公司叫我配置SVN服务器,我是按照项目建库的,现在以一个项目为例向大家说明一下:

我把项目1分为了几个文件夹:Trunk、tags、test、testobject、doc等,我在项目1的的根目录conf里设置权限,但是为了保密,给别的部门测试时是不能叫测试人员访问全部项目的,只能由他们访问testobject去下载测试程序,但是如果不给测试人员在项目1中分配权限,他将无法访问任何一个文件夹。

请问如果设置用户在一个库里访问不同文件夹的权限。

单独的svn服务中是无法实现的

可以通过apache + svn的部署方式利用apache来对访问区域进行控制,达到你说的那种设置用户在一个库里访问不同文件夹的权限。

建议你采用apache+svn+svnmanager的部署方式使用

楼上的,为什么单独的svn不能实现呢?

apache仅仅是个web服务器吧

回答楼主问:

我认为直接配置svnserve就行

配置那个authz

[groups]

g_vip = morson

g_manager = michael

g_beijing = scofield

g_shanghai = lincon

g_headquarters = rory, linda

g_docs = linda

[arm:/]

@g_manager = rw

* = r

[arm:/diary/headquarters]

@g_manager = rw

@g_headquarters = rw

@g_vip = r

* =

[arm:/diary/beijing]

@g_manager = rw

@g_beijing = rw

@g_vip = r

* =

[arm:/diary/shanghai]

@g_manager = rw

@g_shanghai = rw

@g_vip = r

* =

[arm:/ref]

@g_manager = rw

@g_docs = rw

* = r

[arm:/temp]

* = rw

上面是我从csdn中copy过来的,他的够复杂了,你可以参考一下。

没什么太复杂的:)

如果用svnadmin create了

你就需要把改每个repos里边的server.conf指向同一个passwdfile和accessfile

### 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 = read

# 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

serverconf文件里的

那样老累的

我采用的方法就是apache+svn+svnmanager利用crontab周期性同步,如果带宽允许的情况下可以采用调整hooks实时同步版本系统,效果要比svn好不少

怎么说呢,多项目情况下好维护是最好的

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: