When copying files to Opendrive, is it possible to copy parent folder permissions?

Hello again! :slight_smile:

So there's no issue with the copy/move mechanism as far as the data itself goes. (Robust little thing!)

I have a folder on Opendrive that's marked private but there's a subfolder that I want to share and occasionally add files to, automatically sharing them too. On the Opendrive software and portal it is trivial to mark the folder as "hidden" so all new subfiles and subfolders are made with those permissions - however, rclone does not respect any of that and makes everything it adds "private."

Here's an example of my scenario:
root://private_outer_folder/hidden_inner_folder/

The hidden_inner_folder looks like this:
image

The subfolders created by rclone look like this:
image

Here's what the files should look like:

Except they look like this:
image

These are also noticeable at a glance in the webportal:

So! Is there any way to set these permission flags on the command line or to just copy the permissions from the parent folder?

EDIT: also, the file permissions do not propagate to all subfiles and folders when set in the web portal. I'll contact Opendrive about that one.

It would be possible to add another flag to opendrive, say --opendrive-access which could have 3 values "public", "hidden", "private" so when rclone uploaded a file (or made a directory?) it could set that access value.

Does that sound useful?

That sounds perfect! :smiley:

EDIT: and yes, please apply it to files and folders alike.

Do you want to have a go at this - happy to talk though through it ?

Sure thing, I'm game to experiment.

What needs to be done is go change the value of FileIsPublic here

According to a config variable.

The API docs state this so it should just be a question of changing that value to 1 or 2

Let me know if you need more help than that :slight_smile:

1 Like

I'll have to do some reading and learn about go. I'll get back to you in a few days. Thanks! :slight_smile:

If you know a C-style language (eg C, C++, Java) then you'll find Go very easy. There are some instructions on how to install rclone from source here: https://rclone.org/install/#install-from-source

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.