tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Authorization Cases

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-11-18 16:49:47

Granting Permission via Bucket Policy

Preparations

1. Create a bucket. Granting permissions through a bucket policy involves specific buckets, so you need to create a bucket first. For authorization at the account level, see Granting Permission via CAM in this document.
2. Prepare the UIN of the account to be authorized. This document assumes that the root account that owns the target bucket has a UIN of 100000000001 and its sub-account has a UIN of 100000000011. The sub-account needs to be authorized to access the destination bucket.
Note:
To query sub-accounts created under the root account, log in to the CAM console and view them in the User List.
To create a sub-account, see Creating Sub-user.
3. Open the Add Policy dialog. Click the destination bucket and select Permission Management > Permission Policy Settings > Visual Editor > Add Policy. Then, you can configure a policy as instructed in the authorization cases below. For detailed directions, see Adding a Bucket Policy.
The following lists several authorization cases, which you can configure as needed.

Authorization cases

Case 1: Granting a sub-account full permissions for a specified directory

The configuration information is as follows:
Configuration Item
Description
Effect
Select Allow.
User
Select Sub-account and enter a sub-account UIN, which must be a sub-account under the current root account, such as 100000000011.
Resource
Select a specific resource path, such as folder/sub-folder/*.
Actions
Select All Actions.

Case 2: Granting a sub-account read permission for all files in a specified directory

The configuration information is as follows:
Configuration Item
Description
Effect
Select Allow.
User
Select Sub-account and enter a sub-account UIN, which must be a sub-account under the current root account, such as 100000000011.
Resource
Select a specific resource path, such as folder/sub-folder/*.
Actions
Select Read Operation (listing objects is included).

Case 3: Granting a sub-account read/write permission for specified files

The configuration information is as follows:
Configuration Item
Description
Effect
Select Allow.
User
Select Sub-account and enter a sub-account UIN, which must be a sub-account under the current root account, such as 100000000011.
Resource
Select a specific object key, such as folder/sub-folder/example.jpg.
Actions
Select All Actions.

Case 4: Granting a sub-account read/write permission for all files in a specified directory while denying read/write permission for specified files in the directory

For this case, you need to add an allow policy and a deny policy.
1. First, add the allow policy. The configuration information is as follows:
Configuration Item
Description
Effect
Select Allow.
User
Select Sub-account and enter a sub-account UIN, which must be a sub-account under the current root account, such as 100000000011.
Resource
Specify a directory prefix, such as folder/sub-folder/*.
Actions
Select All Actions.
2. Then, add the deny policy. The configuration information is as follows:
Configuration Item
Description
Effect
Select Deny.
User
Select Sub-account and enter a sub-account UIN, which must be a sub-account under the current root account, such as 100000000011.
Resource
Specify the object key to be denied access, such as folder/sub-folder/privateobject.
Actions
Select All Actions.

Case 5: Granting a sub-account read/write permission for files with a specified prefix

The configuration information is as follows:
Configuration Item
Description
Effect
Select Allow.
User
Select Sub-account and enter a sub-account UIN, which must be a sub-account under the current root account, such as 100000000011.
Resource
Specify a prefix, such as folder/sub-folder/prefix.
Actions
Select All Actions.

Granting Permission via CAM

If you need to grant permissions at the account level, see the following documents:

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan