HTTP Error 403: 403 Forbidden: body content-type denied

What is the problem you are having with rclone?

rclone successfully copied a remote archive of 54Gb over HTTP to local fs but it has troubles with a single file:

$ rclone copy -vv catmu:data/04/04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976 /restic/catmu/
2021/03/16 07:15:01 DEBUG : rclone: Version "v1.53.2-DEV" starting with parameters ["rclone" "copy" "-vv" "catmu:data/04/04894d41c7db3c8c9d54a5636a8db
55aabc9d40fef7b967db13d57ef83d22976" "/restic/catmu/"]
2021/03/16 07:15:01 DEBUG : Using config file from "/home/ferz/.config/rclone/rclone.conf"
2021/03/16 07:15:01 DEBUG : Creating backend with remote "catmu:data/04/04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976"
2021/03/16 07:15:03 DEBUG : Creating backend with remote "/restic/catmu/"
2021/03/16 07:15:03 DEBUG : 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976: Need to transfer - File not found at Destination
2021/03/16 07:15:03 ERROR : 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976: Failed to copy: failed to open source object: Open faile
d: HTTP Error 403: 403 Forbidden: body content-type denied
2021/03/16 07:15:03 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: Open failed: HTTP Error 403: 403 Forbidden: body conte
nt-type denied
2021/03/16 07:15:03 DEBUG : 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976: Need to transfer - File not found at Destination
2021/03/16 07:15:03 ERROR : 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976: Failed to copy: failed to open source object: Open faile
d: HTTP Error 403: 403 Forbidden: body content-type denied
2021/03/16 07:15:03 ERROR : Attempt 2/3 failed with 1 errors and: failed to open source object: Open failed: HTTP Error 403: 403 Forbidden: body conte
nt-type denied
2021/03/16 07:15:04 DEBUG : 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976: Need to transfer - File not found at Destination
2021/03/16 07:15:04 ERROR : 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976: Failed to copy: failed to open source object: Open faile
d: HTTP Error 403: 403 Forbidden: body content-type denied
2021/03/16 07:15:04 ERROR : Attempt 3/3 failed with 1 errors and: failed to open source object: Open failed: HTTP Error 403: 403 Forbidden: body conte
nt-type denied
2021/03/16 07:15:04 INFO  : 
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         2.6s

2021/03/16 07:15:04 DEBUG : 2 go routines active
2021/03/16 07:15:04 Failed to copy: failed to open source object: Open failed: HTTP Error 403: 403 Forbidden: body content-type denied

using curl it succeded:

$ curl --output /dev/null http://myrepository/data/04/04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2045    0  2045    0     0  10123      0 --:--:-- --:--:-- --:--:-- 10174

$ rclone ls catmu:data/04/04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976
4588441 04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d2297

What is your rclone version (output from rclone version)

Server: rclone/v1.53.2-DEV - on FreeBSD 12.2

Client:
rclone-1.53.2
Name           : rclone
Version        : 1.53.2
Installed on   : Sun Mar 14 23:46:15 2021 CET
Origin         : net/rclone
Architecture   : dragonfly:5.8:x86:64

Which cloud storage system are you using?

OS filesystems.

rclone copy remote: /mylocaldestination/

On remote server:
$ rclone serve http -vvv --addr myaddress:port /backup

On client:
$ rclone copy catmu: /restic/catmu/

then I've retried:

$ rclone copy catmu:data/04/04894d41c7db3c8c9d54a5636a8db55aabc9d40fef7b967db13d57ef83d22976 /restic/catmu/

The rclone config contents with secrets removed.

[catmu]
type = http
url = http://myrepository/

Looks odd!

Since both ends are rclone can you make a file tree that reproduces the problem so I can try it locally?

Thank you Nick for your reply.

Using:

  1. curl on the same system (DragonFlyBSD 5.8.3) the file downloade works.
  2. using rclone 1.54 con another computer it works (Ubuntu and FreeBSD 12).

I suspect that it's a bug of the rclone http porting on DragonFlyBSD. I'll contact the maintaner.

Good troubleshooting.

Let me know if I can help further.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.