现有的S3存储桶对象访问被拒绝

编程入门 行业动态 更新时间:2024-10-28 04:21:30
本文介绍了现有的S3存储桶对象访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经为我的存储桶配置了对我所有对象的公共访问权限

I had configured my bucket with public access to all my objects

但是旧文件仍然不公开. 如果我访问旧对象,我将被拒绝访问. 我必须手动将它们更改为public没有其他选择.目前,我的存储桶中有5000个对象.无法手动更改它们 与默认配置相比,我的存储桶配置是否还有其他更改.

But older files is still not public. If i access my old objects i'm getting access denied. I have to manually change them to public no other option for me.Currently i have 5000 objects inside my bucket.Manually changing them is not possible Is there any other thing to change in my bucket configuration from the default one..

推荐答案

您可以使用aws cli命令来实现.使用 aws s3api put-object-acl .

You can use aws cli command to achieve that.Use aws s3api put-object-acl.

说明:

使用acl子资源来设置访问控制列表(ACL) 存储桶中已存在的对象的权限.

uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket.

请注意,put-object-acl命令仅适用于单个对象.如果您想递归运行它,请查看此线程.

Be aware that the put-object-acl command is for a single object only. In case you want to run it recursively, take a look at this thread.

有关>如何授予公众阅读权限的详细信息访问我的Amazon S3存储桶中的某些对象?

更多推荐

现有的S3存储桶对象访问被拒绝

本文发布于:2023-08-01 15:37:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1269547.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被拒   对象

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!