WebDAV – Resolve – (405 Method Not Allowed) in response to PROPFIND request for ‘/svn’
While configuring WebDAV with Apache for accessing SVN repository using web service, if there is a small misconfiguration related to “Location” directive you will see the following error:
svn: Server sent unexpected return value (405 Method Not Allowed) in response to PROPFIND request for '/svn'
Most probably you would have configured a trailing “/” character along with the location as shown below which requires correction.
<Location /svn/> DAV svn SVNPath /project/svn </Location>
You should remove trailing “/” from the path “/svn/” given in the “Location” directive and the modified one looks like this.
<Location /svn> DAV svn SVNPath /project/svn </Location>
If you haven’t made the above mistake and still see the same error, then perhaps the directory specified for SVNPath may not be really a SVN repository path. Otherwise you might have forgotten to initialize the fresh directory which is created for SVN repository. You can use the following commad to initialize SVN repository for the first time.
svnadmin create /project/svn
The above command takes “/project/svn” as an example, you should replace it with whatever directory you specified for SVNPath in Apache configuration.


about 4 years ago
Excellent tips .I really appreciate all these points, and I agree completely…
about 4 years ago
I have read on other sites that it needs the trailing slash in order to avoid getting the error, “svn: Repository moved permanently to ‘http://localhost/svn/’; please relocate.
Indeed, when I make your suggested change, removing the trailing slash, this is exactly the error I receive.
So it appears I have the choice between no trailing slash, and a “moved permanently” error, or with the trailing slash and a “405 Method not allowed” error.
Either way, I’m screwed.
about 4 years ago
Update: I was using SVNParentPath
Your advice works with SVNPath — but I lose the Parent-path functionality.
about 4 years ago
Update: RESOLVED
It turns out I was trying to create a repository at /path/svn, then use that as a ParentPath. I.e., I was running svnadmin create /path/svn.
The correct way is to create a directory at /path/svn, then you can add additional subdirectories, e.g., /path/svn/repo1, /path/svn/repo2, then run:
svnadmin create /path/svn/repo1
svnadmin create /path/svn/repo2
Then, later, if you need another repository, create another sub-directory and run “svnadmin create” again, with no need to restart Apache.
Sometimes you just need to ask somebody the question to find the answer.
The long and sort is, when using SVNParentPath, you do NOT make the parent path a repository. While that might seem obvious in retrospect, for beginners trying put all this together for the first time, the entire process contains dozens of booby-traps waiting to spring on the unwary and inexperienced. I’ve spent more time on Google over the last week than I care for. You can’t imagine how tired I am of reading on numerous sites to make sure the file permissions are all set correctly. (sigh!)
about 4 years ago
That’s right! SVNParentPath is needed if the base directory holds multiple SVN repositories in their own subdirectories. On the other hand, SVNPath is needed if there is only one repository.
about 1 year ago
Update: RESOLVEDIt turns out I was trying to cetare a repository at /path/svn, then use that as a ParentPath. I.e., I was running svnadmin cetare /path/svn.The correct way is to cetare a directory at /path/svn, then you can add additional subdirectories, e.g., /path/svn/repo1, /path/svn/repo2, then run:svnadmin cetare /path/svn/repo1svnadmin cetare /path/svn/repo2Then, later, if you need another repository, cetare another sub-directory and run svnadmin cetare again, with no need to restart Apache.Sometimes you just need to ask somebody the question to find the answer.The long and sort is, when using SVNParentPath, you do NOT make the parent path a repository. While that might seem obvious in retrospect, for beginners trying put all this together for the first time, the entire process contains dozens of booby-traps waiting to spring on the unwary and inexperienced. I’ve spent more time on Google over the last week than I care for. You can’t imagine how tired I am of reading on numerous sites to make sure the file permissions are all set correctly. (sigh!)