How can I change all existing objects in my bucket to public or private using s3cmd or Cyberduck?

Linode Staff

How can I change all existing objects in my bucket to public or private using s3cmd or Cyberduck?

2 Replies

Using s3cmd

To recursively set all objects in your bucket to public, the s3cmd tool can be used:

https://www.linode.com/docs/guides/how-to-use-object-storage/#s3cmd

After installing and configuring, use the following command to set all objects to public:

s3cmd setacl s3://bucketname --acl-public --recursive

Alternatively, all objects in the bucket can be set to private using this command:

s3cmd setacl s3://bucketname --acl-private --recursive

Using Cyberduck

This can also be done through Cyberduck.

  • Click on the first object in the bucket
  • Scroll to the last object in the bucket, Shift + click to highlight and select all the objects
  • Click the system wheel at the top, then click 'Info'
  • If 'Everyone' is listed under 'grantee', click the setting to the right, then change to 'Read'. This will change the permissions for all objects selected.
  • If 'Everyone' is not listed, click the system wheel at the bottom, then click 'Everyone' to add it. Then follow the previous step to change all objects to have 'Read' permissions.

@jcardillo Thanks.
The command worked. However it gets stuck after sometime

s3://bucket-storage/images/logos/filename.png: ACL set to Public [151 of 715]

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct