Granting All Accounts the Public Read Permission for a Bucket
Scenario
If a bucket needs to be accessed by all accounts, you can configure a bucket policy and bucket ACL to grant the access permission to all accounts. The following uses a bucket policy as an example.
Configuration Precautions
In this case, the preset template Public Read allows all accounts to perform the following actions on a bucket and the objects in it:
- HeadBucket (to check whether the bucket exists and obtain the bucket metadata)
- GetBucketLocation (to get the bucket location)
- GetObject (to obtain object content and metadata)
- RestoreObject (to restore objects from Archive storage)
- GetObjectVersion (to obtain the content and metadata of a specified object version)
Procedure
- In the navigation pane of OBS Console, choose Buckets.
- In the bucket list, click the bucket name you want to go to the Objects page.
- In the navigation pane, choose Permissions > Bucket Policies.
- On the Bucket Policies page, click Create.
- Choose a policy configuration method you like. Visual Editor is used here.
- Configure parameters for a bucket policy.
Figure 1 Configuring bucket policy parameters
Table 1 Parameters for configuring a bucket policy Parameter
Description
Policy Name
Enter a policy name.
Policy content
Effect
Select Allow.
Principals
- Select All accounts.
Resources
- Select Entire bucket (including the objects in it).
Actions
- Choose Use a template.
- Select Public Read.
- Ensure all the configurations are correct and click Create.
Verification
- After the permission is set, in the Domain Name Details area of the bucket overview page, locate Access Domain Name. Share the URL of the access domain name over the Internet so that all Internet users can access the bucket.
- On the Objects tab page of the bucket, click the target object name and find the object link. Share the object link over the Internet so that all Internet users can access the object.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot