Changing the permission of files

I have copied my files from one place to another. In my rclone configuration I've determined the permission of the files as public. Now I need to change this public permission to private. Is there any chance to do this without copying this files with private permission again ?

rclone can't store user-permissions on files because the cloud-filesystems do not store such data.
The permissions on the files will be whatever you generally set rclone to deliver them as.

--allow-other all users can access
without it, it should only be accessible to the user account you use to run rclone.

If you need more access-restrictions than that - you might have to run rclone as SYSTEM account and then set up a netshare - and on that share you can set regular permissions.

That is assuming Windows...

On Linux you can use the
--umask flag to set permissions, although it will be global.

The only way to preserve any permissions-settings on a file would be to archive the file before uploading as this will bake-in most metadata into the file - thus allowing the cloud filesystem to store it.

Perhaps you could explain what your use-case is and I can suggest what your best option may be. Ie. why are you wanting to set access-permissions?

There is a acl = public-read part for my destination space's config. What I am suspecting is that this config specifies the data permission. Isn't it ?

No, that parameter has to do with the permissions on the clouds file-system (a bucket-based system presumably), the access-control-layer. It is to inform rclone about what permissions it can expect to see when it talks to the cloud-system and it should reflect whatever permissions you have set on the bucket in the cloud.

It is not related to OS user-permissions. The cloud filesystem just don't have this and don't store this sort of data.

The relevant rclone settings for user-permissions would be

  • --umask for Linux (and OSX?)
  • using --allow-other or not (All OS'es)
  • And then you can also set a second layer of access by using a share, which may be the most practical as then you can specify user access in more detail and using the same rules as you are used to from that OS.

These are the only options I can think of. if you need more spesific instructions I need to know your OS and use-case.

This is about digital ocean spaces isn't it?

It is possible to change the ACL on uploaded files but rclone can't do it without re-uploading them. You should be able to do it in the Digital Ocean control panel which might be the easiest way.

@Ahmet_Kartal Oh I just realized - I may have been misunderstanding all along? Are you actually talking about changing the ACL on the files in the bucket? Yea, I would assume like NCW says that the way to do that would be to set them via whatever user-interface the provider gives you.

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