Hello Vikas,
I understand that you are encountering difficulties in renaming the folders, applying container-level ACLs, and creating a blank folder (a folder without any files).
- Please be informed that Azure Blob storage does not have a native "rename" operation for folders. To rename a folder, you would typically need to copy the contents of the folder to a new folder with the desired name and then delete the original folder. You can achieve this by listing the blobs in the source folder, copying each blob to the destination folder with the new name, and then deleting the original blobs.
workaround: Create a new prefix for example, if your current folder is myfolder/, create a new prefix like new_myfolder/. Copy all blobs with the prefix myfolder/
to the new prefix new_myfolder/
. Delete all blobs with the original prefix (myfolder/
).
- Azure Blob storage supports setting access control at the container level using Shared Access Signatures (SAS) or Azure RBAC (Role-Based Access Control) for management operations. To apply container-level ACL, you can generate a SAS token with the desired permissions and scope it to the container level. This allows you to control access to the entire container.
Workaround: You can generate SAS tokens with specific permissions (read, write, delete) for individual blobs or containers. This provides granular control over access. Utilize Azure Role-Based Access Control to control access to the container and its blobs. You can assign roles like "Storage Blob Data Contributor" to specific users or groups.
- Azure Blob storage does not have a concept of folders in the same way as a file system. Folders are virtual and are represented by the delimiter ("/") in blob names. To create a "blank folder" (a folder without files), you can upload a blob with a trailing "/" in the name. This acts as a placeholder for the folder. However, Azure Blob storage does not distinguish between folders and files, so the blob itself will exist.
Workaround: If you need to represent an empty "folder," you can create an empty file (e.g., marker.txt
) within that prefix. If you require a true hierarchical file system with folders, consider using Azure Files.
References:
- Known issues with Azure Data Lake Storage- https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-known-issues#blob-storage-apis
- Access control lists (ACLs) in Azure Data Lake Storage - https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-access-control#common-scenarios-related-to-acl-permissions
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.