ChaosFish
ChaosFish

Reputation: 72

Azure storage container permission cannot be set

Background

Troubles

blobStorageAccount=probestudent

blobStorageAccountKey=$(az storage account keys list -g ProbeStudent \
-n $blobStorageAccount --query [0].value --output tsv) 

az storage container set-permission \ --account-name $blobStorageAccount \ --account-key $blobStorageAccountKey \ --name thumbnails  \
--public-access off

These codes mean that Set container public access.

Upvotes: 0

Views: 310

Answers (1)

Ivan Glasenberg
Ivan Glasenberg

Reputation: 29940

Please remove the character \ if the command is in one line. The symbol \ is just used when the command is too long and need another line.

The below command is working:

az storage container set-permission --account-name $blobStorageAccount --account-key $blobStorageAccountKey --name thumbnails --public-access off

The test result:

enter image description here

Upvotes: 2

Related Questions