亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2608 | 回復(fù): 0
打印 上一主題 下一主題

subversion 安裝后的權(quán)限設(shè)置 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2011-03-04 13:41 |只看該作者 |倒序瀏覽
我的目標(biāo)是使得用戶:chenwei,fengdongwei,zhouwei,luowei,liuxin
有不同的權(quán)限, 于是按照手冊上配置, 出現(xiàn)了錯誤, 主要的問題出在
手冊上的配置是對于一個目錄下有多個資料庫, 但是我的svn目錄下只有一個資料庫,
所以設(shè)置上有些不同
下面是幾個非常好的文章
http://study.pay500.com/2/s24508.htm
http://man.chinaunix.net/linux/d ... arning/ch09s14.html
另外debian.linuxsir.org 上的http://debian.linuxsir.org/main/?q=node/58
都是非常好的文章, 根據(jù)他們文章里面的配置, 下面是一個標(biāo)準(zhǔn)的配置文件
  1. # dav_svn.conf - Example Subversion/Apache configuration
  2. #
  3. # For details and further options see the Apache user manual.
  4. # <Location URL> ... </Location>
  5. # URL controls how the repository appears to the outside world.
  6. # In this example clients access the repository as http://hostname/svn/repos
  7. <Location /svn>
  8. # uncomment this to enable the repository
  9. DAV svn
  10. # set this to the path to your repository
  11. SVNParentPath /var/lib/svn
  12. SVNIndexXSLT "/svnindex.xsl"
  13. # The following allows for basic http authentication. Basic authentication
  14. # should not be considered secure for any particularly rigorous definition of
  15. # secure.
  16. # to create a passwd file
  17. # # rm -f /etc/apache2/dav_svn.passwd
  18. # # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon
  19. # New password:
  20. # Re-type new password:
  21. # Adding password for user dwhedon
  22. # #
  23. # Uncomment the following 3 lines to enable Basic Authentication
  24. AuthType Basic
  25. AuthName "Subversion Repository"
  26. # AuthLDAPEnabled on
  27. # AuthLDAPURL ldap://localhost/ou=Users,dc=sczfcpa,dc=com?uid?one
  28. AuthUserFile /etc/apache2/dav_svn.passwd
  29. # Uncomment the following line to enable Authz Authentication
  30. AuthzSVNAccessFile /etc/apache2/dav_svn.authz
  31. # Uncomment the following three lines allow anonymous read, but make
  32. # committers authenticate themselves
  33. # <LimitExcept GET PROPFIND OPTIONS REPORT>
  34. Require valid-user
  35. # </LimitExcept>
  36. </Location>
復(fù)制代碼
另外需要寫權(quán)限文件, 可以參考
[groups] #定義組
admin=jims,ringkee
tests=tester1,tester2

[erp:/] #定義erp儲存庫根目錄的訪問權(quán)限
@admin=rw #admin組有讀寫權(quán)限
tests=r #test用戶只有讀權(quán)限

[oa:/test] #定義oa儲存庫下test目錄的訪問權(quán)限
*= #禁止所有用戶訪問,星號代表所有用戶,權(quán)限為空代表沒有任何權(quán)限
ringkee=rw #打開ringkee用戶的讀寫權(quán)限注意,組用戶的rw必須寫成 @admin 前面有@
用戶的rw沒有@
另外, 由于是多個repo,所以權(quán)限文件里面的目錄是上面那么寫的,
: 前的代表了repo資料庫的名稱,
如果是單獨的資料庫, 那么就一定要沒有: 和他前面的東西。

下面說我的一些經(jīng)驗, 我只有一個svn的repo~,所以配置不一樣:
svn權(quán)限的安裝
  1. <Location /svn>
  2. DAV svn
  3. SVNPath G:\svn\repository
  4. AuthType Basic
  5. AuthName "Subversion repository"
  6. AuthUserFile G:\svn\svn-auth-file

  7. #AuthzSVNAccessFile G:\svn\accessfile
  8. <LimitExcept GET PROPFIND OPTIONS REPORT>
  9. Require valid-user
  10. </LimitExcept>
  11. </Location>
復(fù)制代碼
上面的代碼可以實現(xiàn)驗證用戶的提交,但是沒法做到按目錄的管理
在accessfile里面
如果是多個respositor, 則寫為[testmgr:/]這樣的目錄, 但是
如果上面用的SVNPath,只有一個res,那么必須寫[/]這樣的目錄
而且 , 如果是rw權(quán)限的話, 必須使用@group=rw才可以
組用戶是@admin=rw
用戶是liuxin=rw
單個項目的話, 目錄是這樣的
[/testmgr/branches/]
以res的名稱開頭
郁悶!

最后的配置文件是
  1. [groups]
  2. admin=root
  3. leader=chenwei
  4. dev=fengdongwei,zhouwei,luowei,liuxin

  5. [/testmgr/branches/fengdongwei]
  6. fengdongwei=rw
  7. [/testmgr/branches/zhouwei]
  8. zhouwei=rw
  9. [/testmgr/branches/luowei]
  10. luowei=rw
  11. [/testmgr/branches/liuxin]
  12. liuxin=rw

  13. [/testmgr]
  14. *=r
  15. @admin=rw
  16. @leader=rw
復(fù)制代碼
幾個比較重要的命令是
svnadmin create d:\svn\repository 在那個目錄下建立repository檔案庫, 如果在這個目錄D:\svn\下建立多個的話,就需要在上面的配置文件里面用SVNParentPath了, 現(xiàn)在svn目錄下只有一個repo,就只能用SVNPath

svn import . http://localhost/svn -m "Initial repository layout" 導(dǎo)入一個目錄
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP