Bug 74711

Summary: systemd.automount need superuser permission to mount
Product: systemd Reporter: Mike <michele.cane>
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTABUG QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mike 2014-02-08 13:43:28 UTC
Hi,

I was trying to set up systemd.automount via sshfs from my laptop to a remote server.
The issue I encountered is that systemd mounts the server as PID1, therefore the keyring cannot unlock the rsa password from my user and mount fails.
I then had to create a new passwordless rsa in /root/.ssh. The server is now mounted when I access the relative folder but my user cannot unmount it (I need to sudo fusermount -u).
Am I missing something on how this feature is supposed to be used? I was expecting it to work like udisk where my user can mount and unmount the usb key.

Cheers

Mike
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-02-08 18:54:21 UTC
Does it work as expected if you add User=<your-user> in the .mount file?
Comment 2 Mike 2014-02-08 19:37:17 UTC
The issue persists after adding User=<your-user> in the .mount file.

Cheers

Mike
Comment 3 Lennart Poettering 2014-02-21 13:51:34 UTC
systemd will only deal with system mounts, not user mounts. It is not suitable for interactive mounts and where the credentials required for mounting are inherently bound to some user identity, rather than system identity.

sshfs is certainly bound to user identity. 

This is hence pretty much out-of-focus for systemd itself, the same way as mounting removable disks is done by udisks and out-of-focus for systemd. Sorry.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.