Apache上的SVN失败(errcode=";13";)无法打开请求SVN文件系统

Apache上的SVN失败(errcode=";13";)无法打开请求SVN文件系统,apache,svn,Apache,Svn,我的症状和你的一样。然而,这个问题的解决方案对我来说并不奏效 错误消息: <D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns" xmlns:C="svn:"> <C:error/> <m:human-readable errcode="13">Could not open the requested SVN filesystem</m:human-readable> </D

我的症状和你的一样。然而,这个问题的解决方案对我来说并不奏效

错误消息:

<D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns" xmlns:C="svn:">
<C:error/>
<m:human-readable errcode="13">Could not open the requested SVN filesystem</m:human-readable>
</D:error>
ps aux|grep www

root     14034  0.0  0.0   5412   772 pts/4    S+   16:42   0:00 grep www
我的回购文件夹上的
ls-as
结果:

drwxrwxrwx 7 apache apache 4096 2011-10-07 16:13 .
drwxr-xr-x 7 apache apache 4096 2011-10-07 14:04 ..
-rw-r--r-- 1 apache apache  229 2011-10-07 13:50 README.txt
drwxr-xr-x 2 apache apache 4096 2011-10-07 15:50 conf
drwxr-xr-x 2 apache apache 4096 2011-10-07 13:50 dav
drwxr-sr-x 5 apache apache 4096 2011-10-07 14:25 db
-rwxrwxrwx 1 apache apache    2 2011-10-07 13:50 format
drwxr-xr-x 2 apache apache 4096 2011-10-07 13:50 hooks
drwxr-xr-x 2 apache apache 4096 2011-10-07 13:50 locks

Apache通常有另一个用户访问数据。一般称为www数据。您可以通过调用
ps aux
检查并搜索apache进程是否启用了
selinux
?我通常会在
mod\u dav\u svn
中禁用它,但您可以通过一些配置使它工作

vince@fedora12 /etc/httpd/conf.d > cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

我在研究,我发现了这个

很可能你已经搞定了SELinux,这是一个安全系统,我不太了解它到底是如何工作的,但这就是问题所在。如果你想知道是否在类型上

[root@localhost~]#得到执行

如果说强制执行,是开着的

要停用它,请键入

[root@localhost~]#chcon-R-t httpd_sys_content_t/var/www/svn/your/path

[root@localhost~]#chcon-R-t httpd_sys_rw_content_t/var/www/svn/your/path


这是一个旧线程,但我遇到了相同的错误消息。在我的例子中,我使用另一个硬盘作为存储库,这样我就必须拥有整个磁盘上的www数据。我找到了这个线程并应用了它


我认为它使用httpd.conf文件中设置的任何用户。对于某些版本,默认为“www-data”,但在较新的版本中默认为“apache”。你能在你的存储库上执行
ls-al
吗?另一个线索:你的apache服务器是chrooted吗?我承认我是个noob。我不知道这意味着什么,我也不知道如何检查……是的,一旦您的标准文件系统权限设置正确,更改SELinux上下文是最后一步。为清楚起见,上面的命令不会停用系统上的SELinux,而只是更改SVN目录的安全上下文,以便Apache可以访问它。
drwxrwxrwx 7 apache apache 4096 2011-10-07 16:13 .
drwxr-xr-x 7 apache apache 4096 2011-10-07 14:04 ..
-rw-r--r-- 1 apache apache  229 2011-10-07 13:50 README.txt
drwxr-xr-x 2 apache apache 4096 2011-10-07 15:50 conf
drwxr-xr-x 2 apache apache 4096 2011-10-07 13:50 dav
drwxr-sr-x 5 apache apache 4096 2011-10-07 14:25 db
-rwxrwxrwx 1 apache apache    2 2011-10-07 13:50 format
drwxr-xr-x 2 apache apache 4096 2011-10-07 13:50 hooks
drwxr-xr-x 2 apache apache 4096 2011-10-07 13:50 locks
vince@fedora12 /etc/httpd/conf.d > cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
sudo chown www-data:www-data /media/yourdisk -R