How to make my spaces PUBLIC

Posted July 10, 2018 19.1k views
Configuration ManagementUbuntu 18.04

I can’t see permission option for spaces root or sub folders like FILES.
I Want to make it public as a whole.
please help

1 comment
  • It is becoming a regular basis that I find myself on one of these DO support pages, reading about an issue (AND SOLUTIONS) that have been completely ignored for years. The longer I am with DO, the more I lose faith that they even care about customers any more.

    Yet another reason to move away from DO rather than trying to embrace their services. Not being able to bulk update the permissions of a bucket, is ridiculous. This was raised 2 and a half years ago DO… WAKE UP???

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
11 answers

+1 An upload into a directory that has public ACL does not inherit such settings.

I got the same issue. How to automatically set new uploaded files as PUBLIC?

This might help everyone. I just solved the issue when uploaded file to space, by default is set to private. This is how you can change it to public. Full code, btw this is node:

  s3 = require('s3'),
  GV = require('/path/to/config/file');

let client = s3.createClient({
    s3Options: {
      accessKeyId: GV.digitalOcean.spaces.key,
      secretAccessKey: GV.digitalOcean.spaces.secret,
      region: GV.digitalOcean.spaces.region,
      endpoint: GV.digitalOcean.spaces.endpoint

        params = {
          localDir: '/local/path/file',
          deleteRemoved: true,

          s3Params: {
            Bucket: GV.digitalOcean.spaces.bucketName,
            Prefix: '/remote/path/file',
            ACL: 'public-read'  // this should set the file to Public
        uploader = client.uploadDir(params);

      uploader.on('error', function(err) {
        console.error("unable to sync:", err.stack);

      uploader.on('progress', function() {
        console.log("progress", uploader.progressAmount, uploader.progressTotal);

      uploader.on('end', function() {

  • For anyone trying to do this on .net/c# with the AWSSDK.S3 library, you use the CannedACL property in the PutObjectRequest model,

    var req = new PutObjectRequest()
       BucketName = _bucket,
       InputStream = fileStream,
       Key = fileName,
       CannedACL = new S3CannedACL("public-read")
    var res = await _s3Client.PutObjectAsync(req);

Not being able to set the default permissions in a space is a big problem. I don’t think that the code snippets shared above are a real solution.

Collaborators on my projects should be able update content in the space, without running any code. It seems like the real fix would be for DigitalOcean to implement decent permissions inheritance.

It turns out DO buckets are fully compatible with S3, down to the bucket policy level. I was able to follow this guide:

Specifically, setting the bucket policy to allow public access worked. Here is the command I used with the AWS CLI:

aws --endpoint-url= s3api put-bucket-policy --bucket=<BUCKET> --policy file://policy.json


    "Version": "2012-10-17",
    "Statement": [
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
            "Resource": [

Hello friend!

This can definitely be done. I have some documentation here that can help:

Kind Regards,

HI, the only way to edit multiple files permissions is to go into a folder, select all and then select ACTION dropdown, it allows you to edit permission for all selected files. However this does NOT work when you select all (select all files in this folder).

I think this needs to be fixed because it cost me time and time is money

    Bucket: process.env.BUCKET,
    Policy: JSON.stringify({
                "Principal": "*",
}, (err, data) => {
    if(err) {
    } else {

With the aws-sdk you can update the bucket policy so all files will get this when uploaded. I still can’t get it to work for the edge CDN though.

correction it does work, you select ALL, then scroll down so more files load, then select all again. You should now be able to change permissions. Still it would be nice to have some more functionality on file and folder management, its basic at best but does the job I guess

Previous 1 2 Next