2015-12-21 120 views
0

我有一個SVN存儲庫存儲在Apache服務器上。Apache:無法設置簡單的SVN用戶和訪問權限

身份驗證是通過SSPI完成的,我試圖將其轉移到更基本的東西(擁有本地用戶名/密碼列表)。

的httpd.conf

LoadModule sspi_auth_module modules/mod_auth_sspi.so 
LoadModule actions_module modules/mod_actions.so 
LoadModule alias_module modules/mod_alias.so 
LoadModule asis_module modules/mod_asis.so 
LoadModule auth_basic_module modules/mod_auth_basic.so 
#LoadModule auth_digest_module modules/mod_auth_digest.so 
#LoadModule authn_alias_module modules/mod_authn_alias.so 
#LoadModule authn_anon_module modules/mod_authn_anon.so 
#LoadModule authn_dbd_module modules/mod_authn_dbd.so 
#LoadModule authn_dbm_module modules/mod_authn_dbm.so 
LoadModule authn_default_module modules/mod_authn_default.so 
LoadModule authn_file_module modules/mod_authn_file.so 
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 
#LoadModule authz_dbm_module modules/mod_authz_dbm.so 
LoadModule authz_default_module modules/mod_authz_default.so 
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 
LoadModule authz_host_module modules/mod_authz_host.so 
#LoadModule authz_owner_module modules/mod_authz_owner.so 
LoadModule authz_user_module modules/mod_authz_user.so 

... 

<Location /svn_toto> 

    DAV svn 
    SVNParentPath D:\web_server\svn_repositories_test 
    AuthzSVNAccessFile D:\web_server\svn_repositories_test\svnaccessfile.txt 
    #Satisfy Any 
    Require valid-user 
    AuthType Basic 
    AuthName "Subversion Repository toto" 
    AuthUserFile D:\web_server\svn_repositories_test\users.txt 

    SVNIndexXSLT "/svnindex.xsl" 

</Location> 

users.txt

[users] 
super = super 
jean = jean 

svnaccessfile.txt

[groups] 
admin = super 

[/] 
@admin = rw 

[cloisonnement:/] 
jean = rw 
super = rw 

[cloisonnement:/trunk] 
jean = rw 
super = rw 

現在,從客戶機,我嘗試:

svn ls https://servername/svn_toto/cloisonnement/trunk --username super --password super 

而這種失敗並問我密碼:

Authentication realm: <https://servername:443> Subversion Repository toto 
Username: super 
Password for 'super': ***** 
Authentication realm: <https://servername:443> Subversion Repository toto 
Username: super 
Password for 'super': ***** 
svn: E215004: Unable to connect to a repository at URL 'https://servername/svn_toto/cloisonnement/trunk' 
svn: E215004: No more credentials or we tried too many times. 
Authentication failed 

我在做什麼錯?

回答

1

你混合SVN內置的明文認證和基本HTTP認證Apache中:

通過聲明

Require valid-user 
    AuthType Basic 
    AuthUserFile D:\web_server\svn_repositories_test\users.txt 

指着你的Apache HTTP服務器組織的認證。 將用戶添加到您需要執行文件:

htpasswd D:\web_server\svn_repositories_test\users.txt super 
htpasswd D:\web_server\svn_repositories_test\users.txt jean 

的PROGRAMM會提示您輸入相應的密碼,並將它們存儲在user.txt文件,加密。

+0

謝謝彼得。我完全錯過了這種凌駕。我絕對不是服務器管理員,只是試圖修改我們的存儲庫訪問權限的管理方式.... – jpo38