rclone icon indicating copy to clipboard operation
rclone copied to clipboard

fails to create files in AWS S3 in version >=1.53.0

Open jti989 opened this issue 6 years ago • 6 comments

What is the problem you are having with rclone?

Rclone gives access denied when creating a file via touch or sync.

What is your rclone version (output from rclone version)

tested with

rclone v1.53.0 rclone v1.53.1 rclone v1.54.0-beta.4770.a73c78545

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 18.04

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 touch ops2:xsuite-ops2/touch.2 -vv

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2020/09/14 14:13:40 DEBUG : rclone: Version "v1.54.0-beta.4770.a73c78545" starting with parameters ["./rclone" "touch" "ops2:xsuite-ops2/touch.2" "-vv"]
2020/09/14 14:13:40 DEBUG : Creating backend with remote "ops2:xsuite-ops2/"
2020/09/14 14:13:40 DEBUG : Using config file from "/home/xxx/.config/rclone/rclone.conf"
2020/09/14 14:13:40 DEBUG : fs cache: renaming cache item "ops2:xsuite-ops2/" to be canonical "ops2:xsuite-ops2"
2020/09/14 14:13:40 ERROR : Attempt 1/3 failed with 1 errors and: AccessDenied: Access Denied
        status code: 403, request id: C2163B1XXXXXX9AB, host id: mAI8lg7RB/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAcUIP3VKQc6FJClT4Lu4txJLSsPKgWUoAcg=
2020/09/14 14:13:40 ERROR : Attempt 2/3 failed with 1 errors and: AccessDenied: Access Denied
        status code: 403, request id: DN6W6XXXXXXYFXEP, host id: 864dfdPB4Xexxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3MbJI2cOyyQXIboxkNkgpTrbd8UENqvZlM=
2020/09/14 14:13:40 ERROR : Attempt 3/3 failed with 1 errors and: AccessDenied: Access Denied
        status code: 403, request id: 6ADC126XXXXXX573, host id: 4Qrbnj60z9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPMYnflce0a+X3HC/AyhIJ+rsVBYNPBDGVDMs=
2020/09/14 14:13:40 DEBUG : 4 go routines active
2020/09/14 14:13:40 Failed to touch: AccessDenied: Access Denied
        status code: 403, request id: 6ADC126XXXXXX573, host id: 4Qrbnj60z9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPMYnflce0a+X3HC/AyhIJ+rsVBYNPBDGVDMs=

This was tested before with version rclone v1.52.3 and was working well. After rolling back to that version I can use rclone again.

jti989 avatar Sep 14 '20 14:09 jti989

Can you please also add the debug logs from a working version?

darthShadow avatar Sep 14 '20 16:09 darthShadow

Are you using a user with limited access permissions - if so can you state what they are?

I'm guessing this is caused by 801a820c542cb7661c4fe73199ca498d0d471cc0 and will be fixed by adding the flag (or config variable) --s3-assume-bucket-exists

ncw avatar Sep 14 '20 17:09 ncw

@darthShadow here is the working one:

rclone touch ops2:xsuite-ops2/touch.1.52.3 -vv
2020/09/17 12:01:00 DEBUG : rclone: Version "v1.52.3" starting with parameters ["rclone" "touch" "ops2:xsuite-ops2/touch.1.52.3" "-vv"]
2020/09/17 12:01:00 DEBUG : Using config file from "/home/wmd/.config/rclone/rclone.conf"
2020/09/17 12:01:00 DEBUG : fs cache: renaming cache item "ops2:xsuite-ops2/" to be canonical "ops2:xsuite-ops2"
2020/09/17 12:01:01 DEBUG : 4 go routines active

@ncw Yes I am using a limited user:

{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:ReplicateObject",
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObjectVersion",
                "s3:ListBucket",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::xsuite-qs-velero/*",
                "arn:aws:s3:::xsuite-qs-velero"
            ]
        }

I tried to run the command with the flag you suggested, but failed:

./rclone touch ops2:xsuite-ops2/touch.2 -vv --s3-assume-bucket-exists
Error: unknown flag: --s3-assume-bucket-exists

This was with version rclone v1.54.0-beta.4770.a73c78545.

jti989 avatar Sep 17 '20 12:09 jti989

Sorry the flag is called

  --s3-no-check-bucket     If set don't attempt to check the bucket exists or create it

Try that

ncw avatar Sep 18 '20 10:09 ncw

With that flag it works:

./rclone touch ops2:xsuite-ops2/touch.2 -vv --s3-no-check-bucket
2020/09/18 14:18:45 DEBUG : rclone: Version "v1.54.0-beta.4770.a73c78545" starting with parameters ["./rclone" "touch" "ops2:xsuite-ops2/touch.2" "-vv" "--s3-no-check-bucket"]
2020/09/18 14:18:45 DEBUG : Creating backend with remote "ops2:xsuite-ops2/"
2020/09/18 14:18:45 DEBUG : Using config file from "/home/wmd/.config/rclone/rclone.conf"
2020/09/18 14:18:45 DEBUG : fs cache: renaming cache item "ops2:xsuite-ops2/" to be canonical "ops2:xsuite-ops2"
2020/09/18 14:18:45 DEBUG : 4 go routines active

jti989 avatar Sep 18 '20 14:09 jti989

Great - glad that works.

I'll close this as there is a work-around.

ncw avatar Oct 13 '20 15:10 ncw