deostroll
deostroll

Reputation: 11975

altering blob container access permissions

Is there a way to change the permissions of a container post its creation via the management portal?

The code below shows how to do it:

        CloudStorageAccount account = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageConnectionString"]);
        CloudBlobClient client = account.CreateCloudBlobClient();
        CloudBlobContainer container = client.GetContainerReference("sample");
        container.CreateIfNotExists();
        container.SetPermissions(
            new BlobContainerPermissions() { PublicAccess = BlobContainerPublicAccessType.Blob });

However, when I first executed it, I missed out on the SetPermissions call.

I searched the management portal for the same but couldn't find any option to change the container's permission.

Or is there a specific reason that one can't really find this option via the management portal?

Upvotes: 1

Views: 648

Answers (1)

Lukkha Coder
Lukkha Coder

Reputation: 4460

On the Management Portal, select the container and click on the Edit button all the way on the bottom. That will give you the option to change the access permission.

enter image description here

Upvotes: 1

Related Questions