What is the problem you are having with rclone?
rclone copy to Amazon S3 buckets with versions after 1.52.0 fail ("Failed to copy: AccessDenied: Access Denied") before it works.
What is your rclone version (output from rclone version
)
rclone v1.53.4
- os/arch: linux/amd64
- go version: go1.15.6
(I've tried with other versions)
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux amd64 (Debian 10.7 but with the rclone in .zip)
Which cloud storage system are you using? (eg Google Drive)
Amazon S3
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
./rclone copy ~/test10.txt carlesprova-2021-01:carlesprova-2021-01
The rclone config contents with secrets removed.
[carlesprova-2021-01]
type = s3
provider = AWS
env_auth = false
access_key_id = xxxx
secret_access_key = xxxxx
region = eu-north-1
acl = private
A log from the command with the -vv
flag
carles@pinux:~/Baixades/rclone-v1.53.4-linux-amd64$ ./rclone -vv copy ~/test10.txt carlesprova-2021-01:carlesprova-2021-01
2021/01/29 13:48:37 DEBUG : rclone: Version "v1.53.4" starting with parameters ["./rclone" "-vv" "copy" "/home/carles/test10.txt" "carlesprova-2021-01:carlesprova-2021-01"]
2021/01/29 13:48:37 DEBUG : Creating backend with remote "/home/carles/test10.txt"
2021/01/29 13:48:37 DEBUG : Using config file from "/home/carles/.rclone.conf"
2021/01/29 13:48:37 DEBUG : fs cache: adding new entry for parent of "/home/carles/test10.txt", "/home/carles"
2021/01/29 13:48:37 DEBUG : Creating backend with remote "carlesprova-2021-01:carlesprova-2021-01"
2021/01/29 13:48:38 DEBUG : test10.txt: Need to transfer - File not found at Destination
2021/01/29 13:48:38 ERROR : test10.txt: Failed to copy: AccessDenied: Access Denied
status code: 403, request id: 562686156C186B53, host id: 89qbqnyK7SugFY/zvplYqIZNfntW96HNyAm6JaWlZu++UBBtfv9VfGgDdcbLfTGpyARQcoNPriI=
2021/01/29 13:48:38 ERROR : Attempt 1/3 failed with 1 errors and: AccessDenied: Access Denied
status code: 403, request id: 562686156C186B53, host id: 89qbqnyK7SugFY/zvplYqIZNfntW96HNyAm6JaWlZu++UBBtfv9VfGgDdcbLfTGpyARQcoNPriI=
2021/01/29 13:48:38 DEBUG : test10.txt: Need to transfer - File not found at Destination
2021/01/29 13:48:38 ERROR : test10.txt: Failed to copy: AccessDenied: Access Denied
status code: 403, request id: 7859FBA954F614E1, host id: g7/ReKc+Z/YpkHe94T1VUz6af3cLQCIlgDhLpRit+d3WFFUK52YVwYwmBm1mSAxCABnfslY12G0=
2021/01/29 13:48:38 ERROR : Attempt 2/3 failed with 1 errors and: AccessDenied: Access Denied
status code: 403, request id: 7859FBA954F614E1, host id: g7/ReKc+Z/YpkHe94T1VUz6af3cLQCIlgDhLpRit+d3WFFUK52YVwYwmBm1mSAxCABnfslY12G0=
2021/01/29 13:48:38 DEBUG : test10.txt: Need to transfer - File not found at Destination
2021/01/29 13:48:39 ERROR : test10.txt: Failed to copy: AccessDenied: Access Denied
status code: 403, request id: 742F482C936BFEA3, host id: AH/zoC/4Q19P1Sm1xGhZzaeqGafvozCmiVSCaEm1IjjLrN+Fh1tnxO0XFYIC+ta8zNUKljhwewc=
2021/01/29 13:48:39 ERROR : Attempt 3/3 failed with 1 errors and: AccessDenied: Access Denied
status code: 403, request id: 742F482C936BFEA3, host id: AH/zoC/4Q19P1Sm1xGhZzaeqGafvozCmiVSCaEm1IjjLrN+Fh1tnxO0XFYIC+ta8zNUKljhwewc=
2021/01/29 13:48:39 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 1.9s
2021/01/29 13:48:39 DEBUG : 4 go routines active
2021/01/29 13:48:39 Failed to copy: AccessDenied: Access Denied
status code: 403, request id: 742F482C936BFEA3, host id: AH/zoC/4Q19P1Sm1xGhZzaeqGafvozCmiVSCaEm1IjjLrN+Fh1tnxO0XFYIC+ta8zNUKljhwewc=
But if I use an older rclone:
carles@pinux:~$ rclone --version
rclone v1.49.5
- os/arch: linux/amd64
- go version: go1.12.10
carles@pinux:~$ rclone -vv copy ~/test10.txt carlesprova-2021-01:carlesprova-2021-01
2021/01/29 13:49:11 DEBUG : rclone: Version "v1.49.5" starting with parameters ["rclone" "-vv" "copy" "/home/carles/test10.txt" "carlesprova-2021-01:carlesprova-2021-01"]
2021/01/29 13:49:11 DEBUG : Using config file from "/home/carles/.rclone.conf"
2021/01/29 13:49:12 DEBUG : test10.txt: Couldn't find file - need to transfer
2021/01/29 13:49:13 DEBUG : test10.txt: MD5 = 2b0055084a5941fe0333e9b8b9e67b94 OK
2021/01/29 13:49:13 INFO : test10.txt: Copied (new)
2021/01/29 13:49:13 INFO :
Transferred: 7 / 7 Bytes, 100%, 13 Bytes/s, ETA 0s
Errors: 0
Checks: 0 / 0, -
Transferred: 1 / 1, 100%
Elapsed time: 500ms
2021/01/29 13:49:13 DEBUG : 5 go routines active
2021/01/29 13:49:13 DEBUG : rclone: Version "v1.49.5" finishing with parameters ["rclone" "-vv" "copy" "/home/carles/test10.txt" "carlesprova-2021-01:carlesprova-2021-01"]
I've checked the headers and with the older rclone (the one that it works) I see differences in the Host: HTTP header and the PUT path. I'm not sure if this is related to the problem (and we have something "wrong" on the Amazon side):
It works:
2021/01/29 12:19:49 DEBUG : PUT /spi-carlesprova/test2.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWRAEZVVOZDBBAV6Y%2F20210129%2Feu-north-1%2Fs3%2Faws4_request&X-Amz-Date=20210129T121949Z&X-Amz-Expires=900&X-Amz-SignedHeaders=content-md5%3Bcontent-type%3Bhost%3Bx-amz-acl%3Bx-amz-meta-mtime&X-Amz-Signature=777d060abfca8c75dec0c9aa3a70e8bce464224f54f90d214324dd8fbe781d7a HTTP/1.1
Host: s3.eu-north-1.amazonaws.com
User-Agent: rclone/v1.49.5
Content-Length: 6
content-md5: EmqKUbnRu9B/3cZYGaVCww==
content-type: text/plain; charset=utf-8
x-amz-acl: private
x-amz-meta-mtime: 1611922784.352533738
Accept-Encoding: gzip
It fails:
2021/01/29 13:51:58 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/01/29 13:51:58 DEBUG : test11.txt: Need to transfer - File not found at Destination
2021/01/29 13:51:58 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/01/29 13:51:58 DEBUG : HTTP REQUEST (req 0xc000132100)
2021/01/29 13:51:58 DEBUG : PUT / HTTP/1.1
Host: carlesprova-2021-01.s3.eu-north-1.amazonaws.com
User-Agent: rclone/v1.53.4
Content-Length: 154
Authorization: XXXX
X-Amz-Acl: private
X-Amz-Content-Sha256: d1c1b6593fbf2b2c36a9d8d76d668024b53ffbc58142f15314be66a7dfbd95c5
X-Amz-Date: 20210129T135158Z
Accept-Encoding: gzip
2021/01/29 13:51:58 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/01/29 13:51:58 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/01/29 13:51:58 DEBUG : HTTP RESPONSE (req 0xc000132100)
2021/01/29 13:51:58 DEBUG : HTTP/1.1 403 Forbidden
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Fri, 29 Jan 2021 13:52:00 GMT
Server: AmazonS3
X-Amz-Id-2: FMJv/J8XnO4Af7KvbwlBbq4ebMpIQHv7+sHnC1c6ADHXdQ9kz8AO0RPEB2mgmaWGqgjjrIilJJk=
X-Amz-Request-Id: BKAQ9Q5HAYBQ5V8W
The Amazon configuration is the same. I created the bucket today. If there is anything on the Amazon side that you would like to know (or that I should include in the policy) please let me know.
I guess that it is a problem on my side not on rclone or I would have found some information and feel free to point me to any resources or other threads/issues.
Thank you!