Azure-docs: How to get ACL permissions from file system?

Created on 29 Jun 2020  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-docs

Hi,

Is there a function to return ACL permissions from a file system? The get_access_control function only works with directories and files, for example, file_system_client.get_directory_client(i.name).get_access_control()

Best regards,
Cristina


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author data-lake-storage-gensubsvc product-question storagsvc triaged

All 9 comments

@crisansou I can confirm that you are right, the file system client doesn't have a get_access_control.

@normesta is there a way to get ACLs for a file system with the SDK?

Not sure. @priyashetty-gh might know.

ACLs scope is for directories and files for ADLS Gen2. For account and container/filesystem level access, you can use RBAC. For more information, please refer to https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-access-control#set-file-and-directory-level-permissions-by-using-access-control-lists

Ok, this is a gap then because this functionality is available in PowerShell through the command: (Get-AzDataLakeGen2Item -Context $Ctx -FileSystem $FileSystemName).ACL

@crisansou - we'll review and circle back to you on this.

@crisansou - The sample cmdlets in PowerShell are applicable to the ACL of the root directory of a container/filesystem. We will update the PowerShell doc to clarify this and include samples in SDK docs for additional guidance on getting ACLs for the root directory. Will let you know once this is done.

Hi @crisansou, The docs are now updated with notes about how to obtain the root directory (to set ACLs). For Python, you'd call the FileSystemClient._get_root_directory_client method. Thanks for helping us clarify the content!

please-close

Hi @crisansou, The docs are now updated with notes about how to obtain the root directory (to set ACLs). For Python, you'd call the FileSystemClient._get_root_directory_client method. Thanks for helping us clarify the content!

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

monteledwards picture monteledwards  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

Ponant picture Ponant  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments