Alternatively, in the Amazon interface, you can select a directory or file, and click on the action "Mark as public"
-
-
Save unnitallman/b00c74d8f3bf6cd25bb5887343b0078c to your computer and use it in GitHub Desktop.
Setting public read-only ACL for uploaded files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### When using s3cmd, pass in --acl-public when initially creating the files, and the proper ACL will be set | |
### | |
s3cmd sync --acl-public /backups/appimages/tickets/ s3://ares-appimages-production/tickets/ | |
### | |
### To verify the ACL was successfully set, use `s3cmd info` | |
### | |
[ec2-user@ip-10-252-65-126 airlines]$ s3cmd info s3://ares-appimages-production/airlines/99/99/thumbnail | |
s3://ares-appimages-production/airlines/99/99/thumbnail (object): | |
File size: 761 | |
Last mod: Wed, 28 Mar 2012 21:46:19 GMT | |
MIME type: binary/octet-stream | |
MD5 sum: 4abbe78c7d2fab5059501d14c23ff581 | |
ACL: greenantdotcom: FULL_CONTROL | |
ACL: *anon*: READ | |
URL: http://ares-appimages-production.s3.amazonaws.com/airlines/99/99/thumbnail | |
---- | |
### Alternatively, you can go into the S3 interface in the Amazon console and select a folder and select the action "Make Public" which should do the same thing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When using s3fs, make sure to set the default acl appropriately: | |
s3fs#ares-appimages-production /s3mounts/ares-appimages-production fuse use_cache=/tmp,allow_other,uid=222,gid=500,default_acl=public-read 0 0 | |
s3fs#ares-appimages-production-logs /s3mounts/ares-appimages-production-logs fuse use_cache=/tmp,allow_other,uid=222,gid=500,default_acl=public-read 0 0 | |
Wherein the default_acl should be set to public-read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment