linux系统SVN服务器添加修改用户和权限

1、找到SVN安装路径

[root@localhost conf]# pwd

/home/svn/conf

2、文件说明

[root@localhost conf]# ll

total 12
-rw-r--r-- 1 root root 1517 May 25 11:37 authz  //用户权限配置
-rw-r--r-- 1 root root  569 May 25 11:28 passwd //用户名密码配置

-rw-r--r-- 1 root root    0 May 10 11:47 svn_dump

-rw-r--r-- 1 root root 3070 Nov  9  2017 svnserve.conf

3、先添加用户信息

[root@localhost conf]# vi passwd 
      1 ### This file is an example password file for svnserve.
      2 ### Its format is similar to that of svnserve.conf. As shown in the
      3 ### example below it contains one section labelled [users].
      4 ### The name and password for each user follow, one account per line.
      5 
      6 [users]
      7 # harry = harryssecret
      8 # sally = sallyssecret

      9 admin=msllf //用户名=密码

4、添加权限信息

[root@localhost conf]# vi authz 

      1 ### This file is an example authorization file for svnserve.
      2 ### Its format is identical to that of mod_authz_svn authorization
      3 ### files.
      4 ### As shown below each section defines authorizations for the path and
      5 ### (optional) repository specified by the section name.
      6 ### The authorizations follow. An authorization line can refer to:
      7 ###  - a single user,
      8 ###  - a group of users defined in a special [groups] section,
      9 ###  - an alias defined in a special [aliases] section,
     10 ###  - all authenticated users, using the '$authenticated' token,
     11 ###  - only anonymous users, using the '$anonymous' token,
     12 ###  - anyone, using the '*' wildcard.
     13 ###
     14 ### A match can be inverted by prefixing the rule with '~'. Rules can
     15 ### grant read ('r') access, read-write ('rw') access, or no access
     16 ### ('').
     17 
     18 [aliases]
     19 # joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
     20 
     21 [groups]
     22 # harry_and_sally = harry,sally
     23 # harry_sally_and_joe = harry,sally,&joe
     24 
     25 # [/foo/bar]
     26 # harry = rw
     27 # &joe = r
     28 # * =
     29 
     30 # [repository:/baz/fuz]
     31 # @harry_and_sally = rw
     32 # * = r
     33 [/] //访问路径权限

     34 admin=rw //用户 r读权限 w写权限

5、重启svn服务

[root@localhost conf]# killall svnserve //杀死svn服务进程

[root@localhost conf]# svnserve -d -r /home/svn/ //启动svn服务

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值