Request to add --readonly-if-present** switch

Thank you for creating rclone, this is a great tool and I use it every day!
This is a feature request to add –readonly-if-present switch, similar to
–exclude-if-present switch.
It would allow to mark a directory as read-only so files and directories
can be listed, files downloaded but nothing can be altered.
It looks like that code to FUSE mount remote repository as read-only already exists, so
the read-only logic could probably be reused but on a folder by folder basis.
Given a guideline I can help implementing it, please let me know what do you think.

Are you thinking of this as being a feature just for rclone mount?

I think think it would be a fairly tricky feature to implement.

What immediately comes to mind is directory permissions - maybe that would be a sensible way of implementing it…

Hi Nick,

In my case I only need it for rclone mount (FUSE), I am not sure how useful it would be
outside of vfs. I am mounting a remote blob container per user where some folders must be
read-only, some read/write, and some are hidden. Hiding of files and folders you already implemented it, having read-only is what I miss. I do agree that directory permissions support would be a much better solution, so let’s do it then :slight_smile: