SVN on Apache failing (errcode="13") Could not open the request SVN filesystem
Solution 1
I was researching and I find this.
Problably you have SELinux anabled, is a security system that I don't understad very well how does it work exactly but that's the problem. If you want to know if is on type
[root@localhost ~]# getenforce
If says enforcing, is on
In order to deactivate it type
[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
Solution 2
Do you have selinux
enabled? I typically disable it for mod_dav_svn
but you can get it working with some configuration.
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
Solution 3
Apache generally have another user to access data. Generally it is called www-data. You can check by calling ps aux
and search for apache processes
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
I have the same symptoms as Error number 13 - Remote access svn with dav_svn failing. However, the solution to that problem does not work for me.
The error message:
<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>
The relevant apache log entry:
(20014)Internal error: Can't open file '/svn/testrepo/format': Permission denied
The subversion conf file:
<Location /svn> DAV svn SVNPath /svn/testrepo </Location>
However, I've further confirmed that user
apache
can, indeed, open the file/svn/testrepo/format
, and can not only open it, but move it, duplicate it, delete it, and overwrite it. (su apache -> do all that stuff.) What can I do next?=========== FURTHER INFORMATION ===========
In response to crazyjul, here are the results of
ps aux | grep apache
apache 14019 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14020 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14021 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14022 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14023 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14024 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14025 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd apache 14026 0.0 0.2 11248 2112 ? S 16:40 0:00 /usr/sbin/httpd root 14032 0.0 0.0 5412 772 pts/4 R+ 16:41 0:00 grep apache
The results of
ps aux | grep www
root 14034 0.0 0.0 5412 772 pts/4 S+ 16:42 0:00 grep www
The results of
ls -as
on my repo folder: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
-
Admin over 12 yearsI thought it uses whatever user is set in the httpd.conf file. Which, for some versions, defaults to "www-data", but in more recent versions defaults to "apache".
-
crazyjul over 12 yearscan you do a
ls -al
on your repository? -
crazyjul over 12 yearsAnother clue : Is your apache server chrooted?
-
Admin over 12 yearsI'll admit here that I'm a noob. I don't know what that means, and I don't know how to check...
-
ATG over 4 yearsYes, changing SELinux context is the last step once your standard file system permissions are set correctly. For clarity, the commands above don't deactivate SELinux on the system, but just change the security context of the SVN directory so that Apache can access it.