Skip to content

mkdir is a no-op with --s3-no-check-bucket #4665

Open

Description

@jamshid

What is the problem you are having with rclone?

The new --s3-no-check-bucket option from #4449 causes mkdir to be a no-op.
Is that intended behavior?

I know it doesn't make sense to use that option with mkdir but I'm trying to workaround new behavior from rclone, where rclone copy hello.txt caringo:mybucket does a PUT /mybucket even if the bucket already exists. Yes that should be okay, AWS S3 returns a 200 OK for a PUT of a bucket that already exists. But the S3-compatible system I'm using is not quite compatible here and returns a 409 error :-(.

Anyway I'll file a bug with the S3-compatible server about this incompatibility and change the test script I'm using to allow specifying different options for the mkdir and copy operations.
But it seems mkdir should create the bucket regardless of --s3-no-check-bucket.

What is your rclone version (output from rclone version)

bash-4.2# rclone-current --version
rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15

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

centOS 7.7

Which cloud storage system are you using? (eg Google Drive)

S3-compatible

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone --s3-no-check-bucket mkdir caringo:s3test-rclone-current-https-r721y1gn

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

$ rclone-current -vv --dump headers --s3-no-check-bucket mkdir caringo:s3test-rclone-current-https-r721y1gn
2020/10/09 00:20:55 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone-current" "-vv" "--dump" "headers" "--s3-no-check-bucket" "mkdir" "caringo:s3test-rclone-current-https-r721y1gn"]
2020/10/09 00:20:55 DEBUG : Creating backend with remote "caringo:s3test-rclone-current-https-r721y1gn"
2020/10/09 00:20:55 DEBUG : Using config file from "/root/.rclone.conf"
2020/10/09 00:20:55 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2020/10/09 00:20:55 DEBUG : S3 bucket s3test-rclone-current-https-r721y1gn: Making directory
2020/10/09 00:20:55 DEBUG : 2 go routines active

Activity

  1. added this to the v1.54 milestone on Oct 9, 2020
  2. ncw commented on Oct 9, 2020

    @ncw
    Member

    But it seems mkdir should create the bucket regardless of --s3-no-check-bucket.

    Yes I'd agree.

    It should be easy enough to fix hopefully...

    Fancy having a go @jamshid ?

  3. added a commit that references this issue on Oct 14, 2020
    2049fb3
  4. jamshid commented on Oct 14, 2020

    @jamshid
    Author

    Sure, I gave it a shot and made a pull request.
    Let me know if I missed anything or if I should fix in a different away.

  5. modified the milestones: v1.54, v1.55 on Feb 3, 2021
  6. modified the milestones: v1.55, v1.56 on Apr 3, 2021
  7. modified the milestones: v1.56, v1.57 on Jul 20, 2021
  8. modified the milestones: v1.57, Known Problem on Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions