forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
51 lines
5.7 KiB
HTML
51 lines
5.7 KiB
HTML
<a name="obs_03_0096"></a><a name="obs_03_0096"></a>
|
|
|
|
<h1 class="topictitle1">Granting Anonymous Users Permission to Access Folders</h1>
|
|
<div id="body1557026128762"><p id="obs_03_0096__p517314258104">If all objects in a folder need to be accessible to anonymous users, you can configure a bucket policy or an object policy to grant anonymous users the permission to access the folder. In this example, a bucket policy is used. If you want to use an object policy to grant permission, select the target folder and configure an object policy. Parameters in both types of policies are the same.</p>
|
|
<div class="section" id="obs_03_0096__section17557163019204"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0096__en-us_topic_0056349953_ol62991470"><li id="obs_03_0096__li99821455306"><span>In the bucket list, click the bucket you want to operate. The <strong id="obs_03_0096__obs_03_0307_b144421021120">Overview</strong> page is displayed.</span></li><li id="obs_03_0096__li19853957175612"><span>In the navigation pane, choose <strong id="obs_03_0096__obs_03_0142_b2055212481903">Permissions</strong>.</span></li><li id="obs_03_0096__li8120153165517"><span>Choose <strong id="obs_03_0096__b23113213129">Bucket Policies</strong> > <strong id="obs_03_0096__b19512328126">Custom Bucket Policies</strong>.</span></li><li id="obs_03_0096__li81441540133419"><span>Click <strong id="obs_03_0096__b4839432131212">Create Bucket Policy</strong>. The <strong id="obs_03_0096__b984273212127">Create Bucket Policy</strong> dialog box is displayed.</span></li><li id="obs_03_0096__li17931032163517"><span>Configure parameters according to the following table, so that you can grant anonymous users the permission to access the folder and objects in it:</span><p>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0096__table7531653104420" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for granting permission to access a bucket</caption><thead align="left"><tr id="obs_03_0096__row2532105311447"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.5.2.1.2.3.1.1"><p id="obs_03_0096__p16532195364414">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.5.2.1.2.3.1.2"><p id="obs_03_0096__p15532145310443">Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0096__row953216536449"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0096__p1653265344417">Policy Mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><p id="obs_03_0096__p55421614212"><strong id="obs_03_0096__b199557458122">Customized</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0096__row16532753114417"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0096__p353219537448">Effect</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><p id="obs_03_0096__p26391018182813"><strong id="obs_03_0096__b39263566122">Allow</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0096__row115321753164415"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0096__p1553215538449">Principal</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0096__ul1133312113418"><li id="obs_03_0096__li43331311164115"><strong id="obs_03_0096__b16596155891220">Include</strong></li><li id="obs_03_0096__li23431813154117">Select <strong id="obs_03_0096__b1374419592122">Other account</strong>, and enter an asterisk (*) as the account ID, indicating all anonymous users.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0096__row653285374414"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0096__p753212538444">Resources</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0096__ul12411915123314"><li id="obs_03_0096__li441291593312"><strong id="obs_03_0096__b977832111316">Include</strong></li><li id="obs_03_0096__li13216171773317">Set this parameter to all objects in the selected folder. If the folder name is <strong id="obs_03_0096__b1597164181314">folder-001</strong>, enter the value <strong id="obs_03_0096__b10981245131">folder-001/*</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0096__row18790945165418"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.1 "><p id="obs_03_0096__p12791194519544">Actions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.2.1.2.3.1.2 "><ul id="obs_03_0096__ul1691025316358"><li id="obs_03_0096__li109104535354"><strong id="obs_03_0096__b18301420171317">Include</strong></li><li id="obs_03_0096__li38571256113513">GetObject</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li><li id="obs_03_0096__li20063255511"><span>Click <strong id="obs_03_0096__b1859082261319">OK</strong>.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="obs_03_0096__section1285315186104"><h4 class="sectiontitle">Verification</h4><ol id="obs_03_0096__ol52806611715"><li id="obs_03_0096__li1055583273617"><span>After the permission is successfully configured, select an object in the folder and click the object name to view its details. The object link (URL) is displayed on the details page. Share the URL over the Internet, so that all users can access or download the object through the Internet.</span></li><li id="obs_03_0096__li728066141711"><span>Use the URL to access the object in a browser. An anonymous user can access the object.</span></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0127.html">Application Cases</a></div>
|
|
</div>
|
|
</div>
|
|
|