You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the cmd_object_put function, after checking the type of the URL,
verify whether the passed bucket exists.
The reason for doing this is that in a self-built S3 Server, I attempted
to upload to a non-existent bucket using s3cmd, similar to
's3cmd put hello s3://b02', where b02does not exist, but the operation
still succeeded(and the file could even be downloaded). This issue arises
due to a design flaw in our S3 Server.
$ ./s3cmd put setup.cfg s3://b02
upload: 'setup.cfg' -> 's3://b02/setup.cfg' [1 of 1]
56 of 56 100% in 0s 11.63 KB/s done
$ mc put setup.cfg myio/b02
mc: <ERROR> unable to upload. Bucket `b02` does not exist.
However, similar clients like the MinIO client would directly return an
error stating that the bucket b02 does not exist.Therefore, I believe it
is necessary for s3cmd to include this check.
$ ./s3cmd put setup.cfg s3://b02
ERROR: Bucket 'b02' does not exist
Signed-off-by: chenmiao <[email protected]>
0 commit comments