405 Method Not Allowed (WebDAV)

When I sync with a webdav server (called Stack) I see errors like "Derek & The Dominos - Layla And Other Assorted Love Songs (40th Anniversary Deluxe 2011)/12 - It's Too Late.mp3: Failed to copy: Method Not Allowed: 405 Method Not Allowed". When I sync the same file with another server, webdav on Google Drive, there are no errors.

I can not find a clear description on what error 405 is. When I remove special characters in the file-path, like ( & the file does sync with Stack.

I have asked help from Stack (company TransIP) what their rules are on pathlenght and special characters. The reply is fuzzy: only space, minus and underscore are allowed. No answer on pathlenght.

But: the files are encrypted before they are uploaded, so Do these special characters (un-encrypted) even matter?

This is on OSX with rclone 1.48 and also on Linux Mint with rclone 1.45.

Can you paste some log of the problem with -vv please?

Here is some -vv output:

2019/08/11 12:14:45 DEBUG : tunebite/Fine Arts Quartet/Four American quartets/11 - Kwartet voor violen [2], altviool en cello nr.3, 1948 deel IV.mp3: Unchanged skipping

2019/08/11 12:20:54 ERROR : tunebite/Fine Arts Quartet/Four American quartets/07 - Kwartet voor violen [2], altviool en cello nr.2, 1983, _Company_ deel IV.mp3: Failed to copy: Method Not Allowed: 405 Method Not Allowed
2019/08/11 12:20:54 ERROR : Encrypted drive 'StackCrypt:MacAudio': not deleting files as there were IO errors
2019/08/11 12:20:54 ERROR : Encrypted drive 'StackCrypt:MacAudio': not deleting directories as there were IO errors
2019/08/11 12:20:54 ERROR : Attempt 1/3 failed with 311 errors and: Method Not Allowed: 405 Method Not Allowed

remark: before and after Company are underscores as in 'Company' but it seems to be filtered out by your Forum software?!? (I see the underscores when I edit my text)

Is this the output you requested? Thanks!


Can you try with -vv --dump responses What I'd like to see is the HTTP request which causes the error and the response with the full error message in it. (You can see which was the HTTP request because it will have an identical hex number to the HTTP response).

This will be print quite a lot of stuff!

It sounds like you aren't encrypting the file names - is that correct?

Do rclone config show remote to find out.

I edited your post to put the text in ```triple backquotes``` which is the best way of putting logs up.

rclone config show:

type = crypt
remote = Stack:RCCrypt
filename_encryption = standard
directory_name_encryption = true
password =   password2 =

rclone -vv --dump responses sync '/home/hans/xxxx yyyyy (4 zzzz)' StackCrypt:Blue:

2019/08/12 13:43:04 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2019/08/12 13:43:04 DEBUG : HTTP REQUEST (req 0xc0003e0700)
2019/08/12 13:43:04 DEBUG : DELETE /remote.php/webdav/RCCrypt/mmivc4rrflegv299dmj9ocreb8/sanpd8aaer0972qqeventh2a3c/ba0d1876tpe13buuv1i5r3hm7alght9ahj9hlk58gft0otgdl2hn0ouqi73vaqaetesjucf3b9nq03tbcrq328ko1iuqv97eot5nli73nqvie1ikqbdu2nsrcslf4pk93vomn7nodb8clbh6jr2irrbpbg HTTP/1.1
Host: hans.stackstorage.com
User-Agent: rclone/v1.45
Authorization: XXXX
Accept-Encoding: gzip

I hope this is helpful. I can send you the full dump, but only per email.

I'd like to see the HTTP request /response which returns the 405 error. Can you email me the log to nick@craig-wood.com? Can you put a link to this forum thread please (I get a lot of email!) Thanks

Thanks for the dump

Here is the relevant transaction (redacted slightly)

2019/08/12 13:43:03 DEBUG : HTTP REQUEST (req 0xc00013e100)
2019/08/12 13:43:03 DEBUG : MKCOL /remote.php/webdav/XXX/XXX/XXX/ HTTP/1.1
Host: XXX
User-Agent: rclone/v1.45
Authorization: XXXX
Accept-Encoding: gzip
2019/08/12 13:43:03 DEBUG : HTTP RESPONSE (req 0xc00013e100)
2019/08/12 13:43:03 DEBUG : HTTP/1.1 405 Method Not Allowed
Content-Length: 18
Cache-Control: no-store, no-cache, must-revalidate
Content-Type: text/plain; charset=utf-8
Date: Mon, 12 Aug 2019 11:43:03 GMT
Expires: Thu, 29 Oct 2015 16:16:00 GMT
Pragma: no-cache
Server: STACK-1.5
Strict-Transport-Security: max-age=31536000
X-Powered-By: TransIP

Method Not Allowed

I think this rclone not recognizing 405 as a valid response to MKCOL.

I'm also pretty sure we've fixed this already - can you try the latest release or if that doesn't work
the latest beta?

Installed and ran rclone v1.48.0-160-gcd7ca2a3-beta (https://beta.rclone.org/rclone-beta-latest-linux-amd64.deb).

Nothing changed, still the same three files Failed to copy: Method Not Allowed: 405 Method Not Allowed

I will send you a new dump. Thanks.

When I shorten the file name of one of the Failed to Copy files to e.g. '01 test.mp3', it syncs without error.

I suspect that is the problem then - the file name is too long after encryption

I realise that I misinterpreted the previous log - there are 405 errors for MKCOL but rclone was dealing with them. The 405 errors that get returned to the user are those for PUT requests of these encrypted file names


These file names aren't extremely long - 235 characters in total with the longest path being 154 characters

Can you run this

 rclone info --check-control=false --check-length=true --check-normalization=false --check-streaming=false StackCrypt:rclone-test

And rclone will print how long the longest file name it can make without an error is - this is what I get on my local file system.

// local
maxFileLength = 255

very strange, I get:

2019/08/12 20:33:16 EME operates on 1 to 128 block-cipher blocks, you passed 513
2019/08/12 20:33:16 EME operates on 1 to 128 block-cipher blocks, you passed 257
2019/08/12 20:33:16 EME operates on 1 to 128 block-cipher blocks, you passed 129
// StackCrypt
maxFileLength = 79

Strange, because in the files that did sync OK unencrypted filename lengths of 189 characters, and path+filename lengths of 266 occur.

On Google Drive:

// GoogleDriveCrypt
maxFileLength = 2047

Hmm interesting. I think that is indicative of a problem with the file name lengths though.

Maybe you could try the same command on the unencrypted remote?

I tested the sync operation on the unencrypted server:

Transferred:   	  429.193M / 429.193 MBytes, 100%, 4.039 MBytes/s, ETA 0s
Errors:                 0
Checks:                 0 / 0, -
Transferred:           62 / 62, 100%
Elapsed time:     1m46.2s

2019/08/13 15:07:30 DEBUG : 5 go routines active
2019/08/13 15:07:30 DEBUG : rclone: Version "v1.48.0-160-gcd7ca2a3-beta" finishing with parameters ["rclone" "-vv" "sync" "/home/hans/xxxx yyyy (4 zzz)" "Stack:Blue"]

and tested the filelenght on the unencrypted server:

// Stack
maxFileLength = 148

Back to you, Nick

148 is about consistent with a length of 79 for crypted files.

So I think this server must be quite limited on file name length for some reason.

You could ask the support team about that?

Another alternative might be to switch filename encryption mode. You could switch to filename obfuscation which will let you have longer file names.

Thanks, yes, I will contact Stack / TransIP. And I will also contact other Stack users, there is a Dutch site, Tweakers.net, with a forum on Stack with members using rclone. I will report results in this topic / forum.

1 Like