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
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@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!
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!