Azure 设置递归 ACL 导致 403 - 虽然更新没问题
Azure setting recursive ACL results in 403 - updating goes okay though
我在 Powershell 中使用 Az.Storage cmdlet 来设置 Azure Data Lake gen 2 存储帐户的权限。通过我的 Azure AD 帐户,我拥有“所有者”权限和“数据存储所有者”权限。
我可以 运行 cmdlet“Update-AzDataLakeGen2AclRecursive”没有问题,但是如果我改为尝试 'replace' 权限,使用“set-AzDataLakeGen2AclRecursive”,我会收到以下错误:
Set-AzDataLakeGen2AclRecursive : An error occurred while recursively changing the access control list. See the InnerException of type Azure.RequestFailedException with Status=403
and ErrorCode=SetAclMissingAces for more information. You can resume changing the access control list using ContinuationToken= after addressing the error.
At file.ps1:62 char:9
+ Set-AzDataLakeGen2AclRecursive -Context $context -FileSystem ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzDataLakeGen2AclRecursive], DataLakeAclChangeFailedException
+ FullyQualifiedErrorId : DataLakeAclChangeFailedException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.SetAzDataLakeGen2AclRecursiveCommand
我不完全确定为什么我会在这种情况下收到 403,因为看起来我已经对该帐户拥有正确的权限。 (使用相同的帐户创建存储帐户 - 并阅读文档,发现需要 'Data Storage Owner')
有什么想法吗?
要回答这个问题 - 您必须首先确保您的 AD 主体具有容器级别的权限才能访问它。
对我而言 - 这意味着授予我的 AAD 帐户 read/write/execute + 我在使用“Set-”cmdlet 之前尝试修改的容器的默认权限。
我在 Powershell 中使用 Az.Storage cmdlet 来设置 Azure Data Lake gen 2 存储帐户的权限。通过我的 Azure AD 帐户,我拥有“所有者”权限和“数据存储所有者”权限。
我可以 运行 cmdlet“Update-AzDataLakeGen2AclRecursive”没有问题,但是如果我改为尝试 'replace' 权限,使用“set-AzDataLakeGen2AclRecursive”,我会收到以下错误:
Set-AzDataLakeGen2AclRecursive : An error occurred while recursively changing the access control list. See the InnerException of type Azure.RequestFailedException with Status=403
and ErrorCode=SetAclMissingAces for more information. You can resume changing the access control list using ContinuationToken= after addressing the error.
At file.ps1:62 char:9
+ Set-AzDataLakeGen2AclRecursive -Context $context -FileSystem ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzDataLakeGen2AclRecursive], DataLakeAclChangeFailedException
+ FullyQualifiedErrorId : DataLakeAclChangeFailedException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.SetAzDataLakeGen2AclRecursiveCommand
我不完全确定为什么我会在这种情况下收到 403,因为看起来我已经对该帐户拥有正确的权限。 (使用相同的帐户创建存储帐户 - 并阅读文档,发现需要 'Data Storage Owner')
有什么想法吗?
要回答这个问题 - 您必须首先确保您的 AD 主体具有容器级别的权限才能访问它。
对我而言 - 这意味着授予我的 AAD 帐户 read/write/execute + 我在使用“Set-”cmdlet 之前尝试修改的容器的默认权限。