Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change all the folder files permission private into public in Digital Ocean spaces?

I have synced my AWS s3:bucket to digital ocean spaces. In my s3:bucket, my all folders/files permission is in Private- but anyone will read. After, the sync s3 - spaces, my all folders/files permission is in Private. Because of that anyone not able to read.

So I want to make my all folders/files permission is in Public. Is there a way to change through the control panel of the Digitalocean. But I have lots of data. If anyone has an idea about it?

Please help me out from this. Thanks in advance.

like image 345
Dhananjayan K Avatar asked Oct 08 '18 07:10

Dhananjayan K


1 Answers

before move/copy file you have to set acl to public in rclone config (rclone.conf) file like this

[spaces]
acl = public-read

if your files are already in Digital Ocean spaces there is no way to modify permission with rclone, you have to use s3cmd, the setup is very slimier to rclone. After setup success, use these command to change permission.

Make a file public

s3cmd setacl s3://spacename/file.txt --acl-public

Make all the files inside a path public

s3cmd setacl s3://spacename/path/to/files/ --acl-public --recursive

learn how to setup s3cmd for space https://www.digitalocean.com/docs/spaces/resources/s3cmd/

usage https://www.digitalocean.com/docs/spaces/resources/s3cmd-usage/

like image 105
Kyaw Kyaw Soe Avatar answered Oct 03 '22 06:10

Kyaw Kyaw Soe