Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

azureblob: fix "409 Public access is not permitted on this storage account"

Nick Craig-Wood54c0f17f2ab4
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go
index af6ff9ddd..2376f44fe 100644
--- a/backend/azureblob/azureblob.go
+++ b/backend/azureblob/azureblob.go
@@ -1363,15 +1363,16 @@ func (f *Fs) makeContainer(ctx context.Context, container string) error {
return nil
}
opt := service.CreateContainerOptions{
- // Specifies whether data in the container may be accessed publicly and the level of access
- Access: &f.publicAccess,
-
// Optional. Specifies a user-defined name-value pair associated with the blob.
//Metadata map[string]string
// Optional. Specifies the encryption scope settings to set on the container.
//CpkScopeInfo *CpkScopeInfo
}
+ if f.publicAccess != "" {
+ // Specifies whether data in the container may be accessed publicly and the level of access
+ opt.Access = &f.publicAccess
+ }
// now try to create the container
return f.pacer.Call(func() (bool, error) {
_, err := f.svc.CreateContainer(ctx, container, &opt)