svn权限配置

okgoes 2023-05-09 13:07:14
Categories: Tags:

配置文件passwd

配置用户名与密码,格式如下:

1
2
3
[users]
 harry = harryssecret
 sally = sallyssecret

harry与sally是用户名,harryssecret与sallyssecret是密码;

配置文件svnserve.conf

开启权限访问

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### 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 the
### directory containing this file.  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 #访问权限配置文件位置

访问配置文件authz

1
2
3
4
5
6
7
8
9
10
11
12
13
[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

admin = harryssecret #admin组用户
vistor = sallyssecret #vistor组用户
[/] #配置目录,/表示svn仓库的根目录
@admin=rw #所属组用户可读可写
@vistor=r #所属组用户可读
*= #表示其他用户无权限