背景
- 我尝试通过 azure doc 学习使用 Azure blob 。
麻烦
- 当我想使用这些代码时出现错误。
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
这些代码意味着Set container public access .
最佳答案
如果命令在一行中,请删除字符\
。符号 \
仅在命令太长且需要另一行时使用。
以下命令正在运行:
az storage container set-permission --account-name $blobStorageAccount --account-key $blobStorageAccountKey --name thumbnails --public-access off
测试结果:
关于asp.net - Azure存储容器权限无法设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59786568/