Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn+apache per directory access control: weird permissions issue (403 Forbidden error)

I had a perfectly working svn+apache install where I was using per directory access control to restrict access to various parts of the repository. In particular, no one had access to the top level in the repository [/]. People had access to folders like [/www] etc. I was specifying these permissions in a file (svn-access-file).

I had to move to a new machine. So I installed subversion-1.6.3 and httpd-2.2.11 on it, and modified the conf file to mimic the conf file on the old machine (and I copied the svn-access-file and the svn-auth-file). Then I took an svn dump and did a load to put stuff back in the new repository. Now I can check stuff out, modify stuff, and commit. However, as soon as I try to do an 'svn up' on an already checked out copy of some sub-folder [/www/people], I get the following error:

svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'https://[servername]/svn'

It seems the problem is that it is trying to access the top level directory [/] even though really it should only be trying to access [/www]. If I temporarily give the user access to [/], it works.

Can someone please tell me how to fix this? Everything worked on the old machine.

Thanks! Gaurav

like image 908
user10 Avatar asked Jul 20 '09 17:07

user10


People also ask

How do you fix Apache you don't have permission to access this resource?

So anytime you see "you don't have permission to access this resource" on Apache servers, try creating a new . htaccess file. This method usually works well for WordPress websites.

Why is Apache forbidden?

There are several potential reasons why the Apache 403 error occurs: The first option is a permission error in the webroot directory, where users don't have access to website files. The second possible reason for a 403 error is missing or incorrect settings in the Apache configuration files.

What is Error 403 Forbidden Linux?

A 403 status code indicates that the client cannot access the requested resource or URL. For example, the wrong username and password were sent in the request. Another reason is that the permissions on the server do not allow what was being asked. Try providing the correct username and password.


1 Answers

Turns out this is a long standing bug in the subversion client. Here's the bug report:

http://subversion.tigris.org/issues/show_bug.cgi?id=3242

It will probably get fixed in the next major release - 1.7 In the meantime, here's a hack workaround:

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2357123

I copied the 'if' statement into the source code for mod_authz_svn.c and rebuilt svn and it works now :)

like image 61
user10 Avatar answered Sep 28 '22 03:09

user10