Why is odrive making my DO-Spaces file automatically PRIVATE upon save?

Hello, here are my steps-

  1. Create a file in DigitalOcean spaces and mark it ‘public’ in manage permissions
  2. Open it in Windows ODrive desktop application
  3. Make changes to the file and hit ‘save’ to trigger odrive sync to DO-Spaces
  4. file on Spaces becomes automatically ‘private’
  5. Manually change permissions to ‘public’ in spaces
  6. save in local one more time
  7. file again automatically switches to ‘private’

If I mark the file to be public, I am INTENDING it to stay public, no?
Just downloaded odrive desktop today and was quite impressed with all other features, except this issue. This is a CRITICAL-SHOWSTOPPER issue for me.

Thanks-

Hi @AlphaJuliet,
I believe the behavior here is expected. There isn’t really an “update” of an object. Instead you are creating a new object with the same object key, so the object is uploaded as not public (the default).

You should be able to set a bucket policy for a particular prefix (path) that can make the items with that prefix public by default. There are some examples here: https://aws.amazon.com/premiumsupport/knowledge-center/read-access-objects-s3-bucket/

@Tony thank you for the response… that does make sense where you are saying it is actually creating a new object in place of the old one as opposed to a true “update” functionality. As FYI, I explained why I need this functionality in case you want to consider reading and preserving permissions through your api in future.

I am using DigitalOcean Spaces (not Amazon S3) where the policy settings are quite basic (possible that I may be missing something here) and I couldn’t find a default ‘public’ type setting (at least through UI).

I disabled the root level file listing of my ‘space’ (this is so that anyone cannot add files to my spaces), but the individual files under the folders are set as ‘public’ to be able to access these from an external website without needing the key. This is basically serving up the static content templates to a ReactJS front-end.

I am stuck for the time being as this may be more of a DigitalOcean problem than ODrive issue. I will look for alternatives. Thanks for your support!

Best,
-aj-

Hi @AlphaJuliet,
Unfortunately I don’t have the time to test this out right now, but it may be possible to use something like this, but modify the resource to include the desired prefix and remove the condition: https://www.digitalocean.com/community/questions/how-to-set-policy-of-space?answer=45351

I haven’t messed with bucket policies for a little while, so I can’t recall if this type of policy would work for your case, but it may be worth a shot.