Forum Discussion
Zer0cool114
Jan 16, 2025Copper Contributor
how can we give access to specific folder only within blob in azure storage account container
I am trying to grant access to specific folder and its contents within a blob in a container. I have tried using ACL and SAS URLs but it gives access to whole container.
Adeelaziz
Jan 16, 2025Brass Contributor
You can try this,
1. Ensure your storage account has the hierarchical namespace enabled, which is required for Azure Data Lake Storage Gen2.
2. Set ACLs on the Folder by:
- Navigate to your storage account in the Azure portal.
- Go to the "Containers" section and select the container that contains your folder.
- Find the specific folder you want to set permissions for.
- Use the "Access control (IAM)" option to assign roles at the folder level.
3. Assign Roles:
- Use Azure role-based access control (RBAC) to assign roles to users or groups. You can assign roles like "Storage Blob Data Reader" or "Storage Blob Data Contributor" to the specific folder.
4. Use Shared Access Signatures (SAS):
- Generate a SAS token with permissions scoped to the specific folder. Ensure the SAS token is configured to allow access only to the desired folder and its contents.
- Zer0cool114Jan 16, 2025Copper Contributor
Have you tested it? I did the same but still can see all the blobs within that container.