Repository: rclone/rclone (language: go)

Issue:
S3: if a bucket already exists, bucket creation silently fails

#### What is the problem you are having with rclone?
When creating a bucket that already exists (created by a different user) rclone silently fails. This throws an error so that the user knows

#### What is your rclone version (output from `rclone version`)
```
rclone v1.66.0
- os/version: arch rolling (64 bit)
- os/kernel: 6.9.1-zen1-2-zen (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.1
- go/linking: dynamic
- go/tags: none
```

#### Which cloud storage system are you using? (e.g. Google Drive)
S3 - Ceph


#### The command you were trying to run (e.g. `rclone copy /tmp remote:tmp`)
`rclone mkdir remote:directorythatisalreadytaken`

A fix can be found in pull request #7519 


Discussion / hints:
Here is what happens on AWS

```
$ rclone mkdir s3:test
2024/05/28 12:25:09 ERROR : Can't retry any of the errors - not attempting retries
2024/05/28 12:25:09 Failed to mkdir: BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
	status code: 409, request id: J1EE52HMKF8QREVC, host id: wBUjObjJtZ5L+pKjgu517yTFcdqAh6MHbh8MUUQR7v8Zv1vnz3c2uRWQanktH4mdFzrC7QeO7vgtAinWffqAuw==
```

Can you check exactly which error CEPH returns - use `-vv --dump bodies --retries 1` on the rclone command and post the log here.

If it returns `BucketAlreadyExists` then you can set `use_already_exists = true` in your config or we can set the CEPH quirk.

See [the docs](https://rclone.org/s3/#s3-use-already-exists) for the full story.

Please can you paste a redacted version of your config. (run `rclone config redacted`)
Returns `BucketAlreadyExists` can confirm that the config setting helps. Will leave this open until it is added as a quirk. 

Thx for the reply
Since you explicitly asked for the dump and the config here
```
2024/05/28 15:28:15 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/05/28 15:28:15 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/05/28 15:28:15 DEBUG : HTTP RESPONSE (req 0xc00016dc20)
2024/05/28 15:28:15 DEBUG : HTTP/1.1 409 Conflict
Content-Length: 248
Accept-Ranges: bytes
Connection: Keep-Alive
Content-Type: application/xml
Date: Tue, 28 May 2024 13:28:15 GMT
X-Amz-Request-Id: tx000005228645d6b0a3665-006655dbef-982fc2e-rub-z

<?xml version="1.0" encoding="UTF-8"?><Error><Code>BucketAlreadyExists</Code><Message></Message><BucketName>testbucket1</BucketName><RequestId>tx000005228645d6b0a3665-006655dbef-982fc2e-rub-z</RequestId><HostId>982fc2e-rub-z-rub-zg</HostId></Error>
2024/05/28 15:28:15 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/05/28 15:28:15 DEBUG : 6 go routines active
```
and config
```

[s3-test]
type = s3
provider = Ceph
env_auth = false
access_key_id = XXX
secret_access_key = XXX
endpoint = https://s3.example.com
acl = private
```
That's great thank you.

Do you want to send a PR to set the quirk?
Sure thing. Will do it in the coming hours/days

Fix patch:
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index a17446f9fba1e..7e4ded02443bf 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -3127,7 +3127,7 @@ func setQuirks(opt *Options) {
 		listObjectsV2 = false
 		virtualHostStyle = false
 		urlEncodeListings = false
-		useAlreadyExists = false // untested
+		useAlreadyExists = true
 	case "ChinaMobile":
 		listObjectsV2 = false
 		virtualHostStyle = false


Test patch: