Amazon S3 Permission problem - How to set permissions for all files at once

+4 votes
I have some files in my S3 bucket. When I try to access them, I get a 403 error i.e Access Denied.

On further research, I found out that I have to change the permission of the file to "view"

How to do that for all the files on the bucket? I know that it is possiable setting permission for each file. It takes very much times when having really many files that need to be viewable for everyone
Mar 27, 2018 in Cloud Computing by hemant
• 5,790 points
4,067 views

2 answers to this question.

+1 vote

This can be done by setting the bucket policy for S3. If not, you will have to set the permission for every object that you upload. Following is the policy which make all the objects public automatically:

{ 

"Version": "2008-10-17", "Id": "http better policy", 

"Statement": [ 

{

"Sid": "readonly policy", 

"Effect": "Allow", 

"Principal": "*", 

"Action": "s3:GetObject", 

"Resource": "arn:aws:s3:::mybucket/sub/dirs/are/supported/*" 

}

                      ]                       

}
answered Mar 27, 2018 by brat_1
• 7,200 points
0 votes

To make a bulk of files public, do the following:

  1. Go to S3 web interface
  2. Open the required bucket
  3. Select the required files and folders by clicking the checkboxes at the left of the list
  4. Click «More» button at the top of the list, click «Make public»
  5. Confirm by clicking «Make public». The files won't have a public write access despite the warning says «...read this object, read and write permissions».
answered Oct 11, 2018 by findingbugs
• 4,780 points

Related Questions In Cloud Computing

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

How to delete the files from AWS S3 except the recently 5 added/updated files?

Use AWS s3 rm command with multiple --exclude options as shown: aws ...READ MORE

answered Jul 30, 2018 in Cloud Computing by Gopalan
• 1,360 points
3,864 views
+4 votes
2 answers

How come AWS S3 is erasing my extension from PDF files?

I think the problem should be with ...READ MORE

answered Mar 27, 2018 in Cloud Computing by code_ninja
• 6,300 points
4,002 views
+4 votes
5 answers

How to do parallel uploads to the same s3 bucket directory with s3cmd?

Is your problem is not with the ...READ MORE

answered Oct 11, 2018 in Cloud Computing by findingbugs
• 4,780 points
4,786 views
+1 vote
3 answers

How to upload files on aws elastic beanstalk?

yes once you store it in (AWS) ...READ MORE

answered Sep 3, 2018 in Cloud Computing by bug_seeker
• 15,510 points
6,832 views
0 votes
1 answer

Is there a way to use websockets for streaming S3 bucket?

I believe that’s not possible natively in ...READ MORE

answered May 10, 2018 in Cloud Computing by DragonLord999
• 8,450 points
2,112 views
0 votes
1 answer

Cache Control for all S3 buckets

Global metadata is something that your S3 ...READ MORE

answered Apr 17, 2018 in Cloud Computing by brat_1
• 7,200 points
1,201 views
0 votes
1 answer

Is there a way to transfer files between AWS s3 and ec2

The answer is a definite yes yes. ...READ MORE

answered Apr 17, 2018 in Cloud Computing by brat_1
• 7,200 points
885 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP