You are not logged in.

#1 2014-03-29 16:18:25

koral
Member
Registered: 2010-08-05
Posts: 26

Automount SSHFS drive in user-level systemd session

Hello,

I'm able to automount a network drive through SSHFS using the following .mount unit in the system-level systemd session:

[Unit]
Description=adama shared drive

[Mount]
What=koral@twyk.org:/home/shared
Where=/home/koral/remote/adama
Type=fuse.sshfs
Options=_netdev,noauto,users,idmap=user,IdentityFile=/home/koral/.ssh/id_rsa,allow_other

[Install]
WantedBy=default.target

As is, the network drive is mounted at system start-up and it is read/write-able by any user logged into the local system.
I'd like the drive to be mounted only when my $USER logs-in and read/write-able only by my $USER, so I considered moving the .mount unit to my user-level systemd session, but now the automounting fails with an unhelpful error message:

systemd[1969]: Mounting adama shared drive...
systemd[1969]: home-koral-remote-adama.mount mount process exited, code=exited status=1
systemd[1969]: Failed to mount adama shared drive.
systemd[1969]: Unit home-koral-remote-adama.mount entered failed state

I guess there is a permission issue somehow, could you please help figuring it out ?

Note: I'm still using systemd-204 as the user-level session is kind of broken in later versions as described here.

Kind regards.

Last edited by koral (2014-03-30 17:54:45)

Offline

#2 2018-01-13 17:52:23

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 54

Re: Automount SSHFS drive in user-level systemd session

Hi @koral!

This post is quite old, but perhaps you're still around smile. I am now facing the same problem that I want to automount with user systemd-files. Did you solve your problem and can give some hints how to do it? Thanks!

Offline

#3 2018-01-27 12:42:29

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 4,472
Website

Re: Automount SSHFS drive in user-level systemd session

Please don't necrobump, open a new thread for you. Also, koral hasn't posted since 2014.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing thread.

Offline

Board footer

Powered by FluxBB