Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8715195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:47:23+00:00 2026-06-13T05:47:23+00:00

I am writing the code to grant READ permissions to all users using aws-sdk

  • 0

I am writing the code to grant READ permissions to all users using aws-sdk gem. In the documentation for the gem, I found the following:

bucket.objects.each do |object|
  puts object.key
  acl = object.acl
  acl.grant(:read).to("TODO: how can I specify 'ALL'???")
  object.acl = acl.to_xml
end

It all makes sense, however I’m not quite sure how can I tell the grant read permission to ALL users?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:47:24+00:00Added an answer on June 13, 2026 at 5:47 am

    The example you have can work, but is more suited for complicated ACLs (access control lists). Amazon S3 has a number of canned-acls you can use for your objects. The follow snippet will update the ACL for all objects in your bucket so anyone can read them.

    bucket.objects.each{|obj| obj.acl = :public_read }
    

    Alternatively, you can set the ACL for an object when you upload (or copy) it.

    # upload a file and set the acl so the world can download it
    obj = bucket.objects['object-key'].write(file, :acl => :public_read)
    
    puts obj.public_url
    #=> 'https://..."
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing code to clone object but have no cue from Hobo documentation.
I find myself often writing code following the pattern: foo xs = map snd
Is writing code for JavaFX 2.0 using Visage essentially the same as if you
I am writing code to read and write a text file. But when I
Often times when writing code, I find myself using a value from a particular
I'm writing some code to permit users to remotely manage IIS7. Under the bonnet
I am writing video code in an iphone, based on HTML. With the following
After writing code that can be boiled down to the following: var size=-1; var
I am writing following code to get authorization token. assigning authorization to code variable
When writing code, I often place debug messages in the code. The debug messages

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.