天天看點

linux svn authorization failed錯誤

找了半天錯誤原因

authorization failed錯誤主要是conf/auth檔案配置錯誤,可以參考如下配置:

### 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]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
admin = u1  //多使用者可以使用,隔開  例如 u1,u2,u3
user = u2  //普通使用者組

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[repos:/]
@admin = rw  //設定使用者組權限

           

最後原因為啟動svn錯誤

源位址:http://www.bubuko.com/infodetail-676435.html

注意:

例如你執行了

svnadmin create works 建立了一個works版本庫,然後你運作svnserve啟動服務的時候 -r參數需要制定works的上一級目錄,要不然也會出現

authorization failed錯誤!

示例路徑pwd:/alidata/svn/works

svnserve -d -r /home/svn

這樣一來auth檔案裡的[repos:/]參數才起作用!
           

啟動時參數錯誤

1,啟動SVN
sudo svnserve -d -r /home/svn/

其中 -d 表示守護程序, -r 表示在背景執行
/home/svn/  為svn的安裝目錄


2,關閉SVN
這裡采取linux殺死程序的方式處理的
ps -ef|grep svnserve
root      4967     1  0 Aug23 ?        00:00:00 svnserve -d -r repository/
這裡  kill -9 4967殺死程序, 此4967為程序号 
           

繼續閱讀