How to make my spaces PUBLIC

Posted July 10, 2018 11.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

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.

9 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);

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

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.

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

Programatically using Python3 and boto3 I essentially use this code to upload a file and make it public:

from boto3.session import Session

def upload_file_and_make_it_public(filename: str, file_obj: BytesIO, bucket: str):
    session = Session(
    client = session.client(
            "s3", endpoint_url="", region_name="...",
    client.upload_fileobj(Bucket=bucket, Key=filename, Fileobj=file_obj)
    resource = session.resource(
            "s3", endpoint_url="", region_name="...",
    resource.Object(bucket, filename).Acl().put(ACL='public-read')
    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.

Submit an Answer