通过http(apache)访问我的SVN存储库时,我收到“无法打开请求的SVN文件系统”错误
的httpd.conf
<...>
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
<...>
User svn
Group svn
<...>
<Location /svn>
DAV svn
SVNPath /srv/svn
</Location>
SVN存储库似乎有正确的预设
[ec2-user@ip-xxx ~]$ ls -lart /srv/svn
total 16
drwxrwxrwx. 3 root root 16 Oct 20 10:58 ..
-rw-rw-r--. 1 svn svn 229 Oct 20 10:58 README.txt
drwxrwxr-x. 2 svn svn 39 Oct 20 10:58 locks
drwxrwxr-x. 2 svn svn 4096 Oct 20 10:58 hooks
drwxrwxr-x. 2 svn svn 51 Oct 20 10:58 conf
-r--r--r--. 1 svn svn 2 Oct 20 10:58 format
drwxrwxr-x. 6 svn svn 80 Oct 20 10:58 .
drwxrwsr-x. 6 svn svn 4096 Oct 20 10:58 db
我以用户svn
[ec2-user@ip-xxx ~]$ ps auxwww|grep httpd
ec2-user 14304 0.0 0.0 110276 996 pts/0 T 06:07 0:00 less /etc/httpd/conf/httpd.conf
root 15102 0.0 0.5 240004 5496 ? Ss 08:39 0:00 /usr/sbin/httpd -DFOREGROUND
svn 15103 0.0 0.3 240004 3116 ? S 08:40 0:00 /usr/sbin/httpd -DFOREGROUND
svn 15104 0.0 0.3 240004 3116 ? S 08:40 0:00 /usr/sbin/httpd -DFOREGROUND
svn 15105 0.0 0.3 240004 3116 ? S 08:40 0:00 /usr/sbin/httpd -DFOREGROUND
svn 15106 0.0 0.3 240004 3116 ? S 08:40 0:00 /usr/sbin/httpd -DFOREGROUND
svn 15107 0.0 0.4 240164 4124 ? S 08:40 0:00 /usr/sbin/httpd -DFOREGROUND
Apache错误日志
[Tue Oct 27 08:40:10.515487 2015] [authz_core:debug] [pid 15107] mod_authz_core.c(835): [client ::1:56072] AH01628: authorization result: granted (no directives)
[Tue Oct 27 08:40:10.515747 2015] [:error] [pid 15107] (20014)Internal error: [client ::1:56072] Can't open file '/srv/svn/format': Permission denied
[Tue Oct 27 08:40:10.515760 2015] [dav:error] [pid 15107] [client ::1:56072] Could not fetch resource information. [500, #0]
[Tue Oct 27 08:40:10.515763 2015] [dav:error] [pid 15107] [client ::1:56072] Could not open the requested SVN filesystem [500, #13]
[Tue Oct 27 08:40:10.515765 2015] [dav:error] [pid 15107] [client ::1:56072] Could not open the requested SVN filesystem [500, #13]
SVN适用file
访问但不适用http
:
[ec2-user@ip-xxx ~]$ svn list file://localhost/srv/svn
branches/
src/
[ec2-user@ip-xxx ~]$ svn list http://localhost/svn
svn: E000013: Unable to connect to a repository at URL 'http://localhost/svn'
svn: E000013: Could not open the requested SVN filesystem
我还尝试将/srv/svn/format
的权限更改为666,但它没有帮助。
红帽企业Linux服务器版本7.1。 SVN版本1.8.8
非常感谢任何帮助。
答案 0 :(得分:1)
错误的原因是 SELinux 模块阻止访问文件。我已经通过编辑/etc/selinux/config
文件禁用了SELinux(请参阅how),重启后,svn list http://localhost/svn
终于有效了。