[systemd-devel] Mount a remote FS as a user

Daniel Tihelka dtihelka at gmail.com
Tue Feb 12 10:57:09 UTC 2019


Hello,
OK, thanks for the clarification.

I was afraid that the situation is like you have described. Still it
surprises me that even the sshfs case cannot be handled by user
instance of systemd ...

Do you have any information that the kernel is going to open autofs
for unpriv clients?
Or, could it be a way to write a d-bus capable daemon (or use/extend
udisks or systemd capabilities?) which would handle the mounts for a
particular user, i.e. a user would provide remote host+fs
type+username+passwd+required mount point+access permissions and the
daemon would mount it then for the user as required. Or has this way a
security flow I don't see?

Thanks,
DT

On Mon, Feb 11, 2019 at 6:27 PM Lennart Poettering
<lennart at poettering.net> wrote:
>
> On Mo, 11.02.19 15:59, Daniel Tihelka (dtihelka at gmail.com) wrote:
>
> > Hello,
> > I can mount a shared file system (sshfs in particular) as an ordinary user.
> >
> > Now I would like to have it handled by systemd on-demand (automount).
> > However, creating the automount unit and starting it fails with error:
>
> autofs (the kernel subsystem behin the .automount unit type) is
> accessible to privileged clients only, and systemd --user is not
> privileged in general. This means what you are trying to do is simply
> not supported by the kernel.
>
> We could start supporting this if the kernel would open up autofs for
> unpriv clients, like it did for fuse mounts. However, I don't see that
> happening any time soon.
>
> Sorry!
>
> Lennart
>
> --
> Lennart Poettering, Red Hat


More information about the systemd-devel mailing list