Skip to content

Instantly share code, notes, and snippets.

@anuragmathur1
Created August 2, 2017 00:00
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save anuragmathur1/29948e50290fc9d937dd3a13098cf78e to your computer and use it in GitHub Desktop.
Save anuragmathur1/29948e50290fc9d937dd3a13098cf78e to your computer and use it in GitHub Desktop.
s3cmd examples to add and remove public-read access for s3 buckets, folders and objects within.
## You may choose to remove --recursive if is required only for the bucket or folder and not for objects within.
s3cmd setacl --acl-private --recursive s3://mybucket-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name/object-name
s3cmd setacl --acl-public --recursive s3://mybucket-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name/object-name
@icy
Copy link

icy commented Jul 27, 2020

caught this from somewhere on the internet. Thanks for the gist. s3cmd doc is ... you know :P

@KnightOfNih
Copy link

Thanks! Just used the public recursive object and it saved me a bunch of time :)

@Moisi
Copy link

Moisi commented Feb 14, 2024

Thanks! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment