首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >mod_authz_svn的奇怪行为

mod_authz_svn的奇怪行为
EN

Stack Overflow用户
提问于 2015-03-27 08:00:48
回答 1查看 1K关注 0票数 8

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

代码语言:javascript
运行
复制
<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文件:

代码语言:javascript
运行
复制
[groups]
g=hy

[test:/]
hy=r
*=

[test:/subdir]
hy=r
*=

[test:/subdir1]
hy=rw
*=

问题是,我希望独立于其他目录来控制subdir的权限,但是如果我将subdir1的权限更改为"rw",则可以写入subdir,如果我将subdir1的权限更改为"r",则subdir的权限将如预期的那样变为"r“。

事实上,如果我将任何目录的权限更改为"rw",那么我希望它是只读的那些目录就变成了可写的。

我在下面粘贴了一些apache日志,以防有帮助。

每次我重新启动apache2时,它都会抱怨不匹配的python版本,但尽管如此,一切都是正常的,我确定它是否相关:

代码语言:javascript
运行
复制
[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'
EN

回答 1

Stack Overflow用户

发布于 2015-04-22 23:13:56

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

默认情况下,根本没有人可以访问存储库。

因此,您不需要显式拒绝您的路径访问。

我将按照以下方式重写您的配置:

代码语言:javascript
运行
复制
[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
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29295833

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档