SVN 405 Method Not Allowed

I accidentally deleted a folder in SVN and added it back immediately. I ran into an issue with this and my solution ended up removing the folder completely from my local copy as well as the server copy. I can do updates and commits without problems on any other file or folder, but if I try to create a folder with the same name, add, and commit, it gives me the following error:

svn: Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request for '/svn/www/!svn/wrk/9de0d765-2203-456c-af16-58e792ec7ac0/trunk/htdocs/solutions/medical'

I have run countless cleanups, commits, updates, etc. Nothing resolves the issue. Ideas?

FYI, I do not have the option of renaming the top level folder.


My guess is that the folder you are trying to add already exists in SVN. You can confirm by checking out the files to a different folder and see if trunk already has the required folder.


The quickest way for me to fix it was to duplicate the affected folder, and commit it with an alternative name. Then svn mv duplicateFolder originalFolder. Pretty easy.

So, take folder1 and make a folder1Copy:

svn delete folder1
svn add folder1Copy

Commit and update:

svn mv folder1Copy/ folder1/

Commit again and it's fixed.


My "disappeared" folder was libraries/fof.

If I deleted it, then ran an update, it wouldn't show up.

cd libaries
svn up

(nothing happens).

But updating with the actual name:

svn update fof

did the trick and it was updated. So I exploded my (manually tar-archived) working copy over it and recommitted. Easiest solution.


I just fixed this in my own repository. I'm using TortoiseSVN on Windows, so I'm not sure exactly what commands this translates to on the command line, but here's what I did:

The problematic folder is called lib, and it was due to be added.

  • First I undid the add, so that SVN was no longer paying attention to it.
  • Then I renamed it (to libs, not that that matters) using the Windows context menu, added it, and committed successfully.
  • Finally I renamed it back to lib using TortoiseSVN's context menu (this is probably important), and committed again.