本文共 3181 字,大约阅读时间需要 10 分钟。
$ su - svnroot$ svnadmin create /home/svnroot/neo
#!/bin/bash################################ Author: Neo> $SVNROOT/conf/passwd}deluser(){ local user=$1 if [ -z $user ]; then usage else ed -s $SVNROOT/conf/passwd <
用法
./svnuser list./svnuser add user passwd./svnuser del user
$ svnadmin create /home/svnroot/project
$ svnserve --daemon --root /home/svnroot/project
[groups]member = neoblog = neo,netkillerwiki = bg7nyt,chen,jingfeng[/]* =[/member]@member = rw* = r[/app/blog]@blog = rw* =[/app/wiki]@blog = rw* =# [repository:/baz/fuz]# @harry_and_sally = rw# * = r
$ svnadmin create /home/svnroot/project1
$ svnadmin create /home/svnroot/project2
$ svnserve --daemon --root /home/svnroot
[groups]member = neoblog = neo,netkillerwiki = bg7nyt,chen,jingfeng[project1:/]* =[project2:/]* = r[project1:/member]@member = rw* = r[project2:/app/blog]@blog = rw* =[project2:/app/wiki]@blog = rw* = r
例 177.1. authz
[aliases]# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average### 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]manager = neodeveloper = jam,john,zentester = evadesigner = allandeployer = ken[/]@manager = rw@developer = r@designer = r@deployer = r@tester = r* =############################## Trunk# ##########################[/www.mydomain.com/trunk]@manager = rw@designer = rw@developer = rw@deployer = r[/images.mydomain.com/trunk]@designer = rw[/myid.mydomain.com/trunk]@designer = r[/info.mydomain.com/trunk]@developer = r@designer = r##############################\Branches#############################[/admin.mydomain.com/branches]@developer = rw@designer = rw[/myid.mydomain.com/branches]@developer = rw@designer = rw[/info.mydomain.com/branches]@developer = rw@designer = rw[/www.mydomain.com/branches]@developer = rw@designer = rw[/images.mydomain.com/branches]@developer = rw@designer = rw[/log.mydomain.com/branches]@developer = rw[/report.mydomain.com/branches]@developer = rw################################ TAGS# #############################[/myid.mydomain.com/tags]@deployer = rw[/admin.mydomain.com/tags]@deployer = rw[/info.mydomain.com/tags]@deployer = rw
svnadmin dump /svnroot/project | gzip > svn.gz
原文出处:Netkiller 系列 手札
本文作者:陈景峯 转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。