簡體   English   中英

mod_authz_svn的奇怪行為

[英]Strange behaviour of mod_authz_svn

我已經在apache2上配置了svn服務器,如下所示:

<Location /svn_test>
    DAV svn
    SVNParentPath /path/to/SvnTest
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile "/path/to/passwd"
    AuthzSVNAccessFile "/path/to/authz"
    Require valid-user
    SVNAdvertiseV2Protocol Off
    AuthzSVNAnonymous Off
</Location>

和authz文件配置如下:

[groups]
g=hy

[test:/]
hy=r
*=

[test:/subdir]
hy=r
*=

[test:/subdir1]
hy=rw
*=

問題是,我想與其他目錄分開控制子目錄的權限,但是如果我將subdir1的權限更改為“ rw”,則可以寫入subdir,並且如果我將subdir1的權限更改為“ r”,則子目錄的權限成為預期的“ r”。

實際上,如果我將任何目錄的權限更改為“ rw”,則我希望其為只讀的那些目錄將變為可寫狀態。

如果有幫助,我在下面粘貼了一些apache日志。

每次我重新啟動apache2時,都會抱怨python版本不匹配,但是盡管如此,一切都正常,我確定它是否相關:

[Fri Mar 27 15:55:44.381138 2015] [mpm_worker:notice] [pid 10693:tid 140245999884160] AH00295: caught SIGTERM, shutting down
[Fri Mar 27 15:55:45.111049 2015] [:error] [pid 13438:tid 139851301021568] python_init: Python version mismatch, expected '2.7.5+', found '2.7.4'.
[Fri Mar 27 15:55:45.111523 2015] [:error] [pid 13438:tid 139851301021568] python_init: Python executable found '/usr/bin/python'.
[Fri Mar 27 15:55:45.111556 2015] [:error] [pid 13438:tid 139851301021568] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Fri Mar 27 15:55:45.111585 2015] [:notice] [pid 13438:tid 139851301021568] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads.
[Fri Mar 27 15:55:45.111600 2015] [:notice] [pid 13438:tid 139851301021568] mod_python: using mutex_directory /tmp 
[Fri Mar 27 15:55:45.122215 2015] [mpm_worker:notice] [pid 13438:tid 139851301021568] AH00292: Apache/2.4.6 (Ubuntu) SVN/1.7.9 mod_python/3.3.1 Python/2.7.4 configured -- resuming normal operations
[Fri Mar 27 15:55:45.122280 2015] [core:notice] [pid 13438:tid 139851301021568] AH00094: Command line: '/usr/sbin/apache2'

http://svnbook.red-bean.com/en/1.7/svn.serverconfig.pathbasedauthz.html

默認情況下,沒有人可以訪問存儲庫。

因此,您無需明確拒絕對路徑的訪問。

我將如下重寫您的配置:

[groups]
g = hy

[test:/]
hy = r

# Permissions are inherited from parent to child directory 
# and hy already has read access to the root of the repo and its subdirectories,
# so this can be skipped:
#[test:/subdir]
#hy = r

[test:/subdir1]
hy = rw

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM