Blue Clouds
Blue Clouds

Reputation: 8161

azcopy sync failing with "409 Public access is not permitted on this storage account." on private container

I have a VM and the Vnet of the VM is added on the Storage account('allow access from selected network' setting). I run azcopy.exe sync command from the VM and it works when the Blob container is public. When I make it private it fails with this error:

Code: PublicAccessNotPermitted
RESPONSE Status: 409 Public access is not permitted on this storage account.

So if public access is not allowed then sync will not work ?

Upvotes: 0

Views: 5099

Answers (3)

Niraj
Niraj

Reputation: 547

I got the same error while creating azure infra with terraform.

I added :

  container_access_type = "private"

inside:

    resource "azurerm_storage_container" "cont1" {
     ...
     ...
     ...
    }

in the main.tf file.

Hope that can give some support to resolve on your context.

Upvotes: 0

J_Tuck
J_Tuck

Reputation: 161

I was setting a SAS token with READ permissions (then all permissions at the object-level) and having no luck.

But creating a SAS token with read and list permissions at the container-level solved this issue for me.

Upvotes: 1

Blue Clouds
Blue Clouds

Reputation: 8161

SAS key worked but access key failed for private blob container. So changing to SAS key was my solution.

Upvotes: 0

Related Questions