Serving specific subdirectory for each user


I would like to use rclone serve to serve (probably sftp) a backend to multiple users. On the backend there's an own subdirectory for each user. I would like to archieve that each user can only read and write his subdirectory and his respective subdirectory should be the root directory for the user.

What is the best way to archieve that? I read the documentation multiple times. I understand how to add multiple users with htpasswd but it looks like each of this users has access to exactly the same directory then, right? So the only option I see right now is to run rclone serve for every user. But as far as I understand then each user would have his own port to connect to which doesn't sound optimal. Is there any other way?
The only other way I can think of is to use rclone mount instead of serve to mount the whole backend and then use another server (like samba) which serves subdirectorys from the mount.

Thanks in advance

You can do this with the auth proxy...

You write a very simple script which maps user names to an rclone config - this config can include a root directory with the _root parameter.

The bit of the docs is here:

Thank you very much, I'll look into that.

1 Like

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