Failed to mount fuse sshfs

  • Open
  • quality assurance status badge
Details
4 participants
  • Efraim Flashner
  • Oleg Pykhalov
  • Tobias Geerinckx-Rice
  • Michael Rohleder
Owner
unassigned
Submitted by
Oleg Pykhalov
Severity
normal
O
O
Oleg Pykhalov wrote on 24 Jun 2020 22:36
(name . bug-guix)(address . bug-guix@gnu.org)
87pn9o19qu.fsf@gmail.com
‘mount -t fuse -o rw,allow_other,debug sshfs#user@host: /mnt’ which
could be used byself or by ‘autofs’ cannot find ‘ssh’ and ‘sshfs’
binaries. A workaround are symlinks:
/bin/ssh -> /gnu/store/...-openssh-8.3p1/bin/ssh
/bin/sshfs -> /gnu/store/...-sshfs-2.10/bin/sshfs
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl7zuWkACgkQFn+OpQAa
+pyl1w//aRkDasiboHaKx9WGjLuwxHCJ9sdZwDEPLu5RDKzwXQ833C2s+Y0lxZap
DS4rGJ3yKQU/BrQhManir97KUSjA31D8PSe8R/qnQc7Bof3323D4s82DJGcgGsEO
olVpN3QvF1Mwf+nhp97+rGWI5BzLhXTbtW1NHKpJAB0RgYBdoH1EkH2SfyV+cff2
BSx4jNVAIvlFIE13nRSvUwDVlQNK0CQE56U4sZT00e6BzPWw+AlCPgIculmS6EUo
CowT71QkRUCyaT6Yknojf0fXSJ+OKImbYOp3e8cmVCnInUIY+omubZQXgLcvEY8J
3CQs/LZ/p5zv6mqbzJl9xN9l6AcYWh7Ph4WU5dVp/F8Jtt9IMufYXaUqWotv3pp2
SRUKxnOT00XrthLaxjUpb1StPwDIh4zuDNSorstDIBMzli339vEj8ypS1nEn2Ui1
nvIWkh9rOyj6B2yZEiF1SZqDuftTqFW/H5HsehEmgr9Mm6XYP4p68hpXyjN15iKd
0q+mLsNudNZnbo6CbYF0zaLNoA1pIqo9VnO/e7ACN4rZ5LWyhs2IcRCLxcEVJn2m
jU3B3Zjxvz8gkom+iyJ8gF8CUgDxQGLHGlHryr0obmdPMpqbjsMogIvppaI23nGH
1Wcrj9BCQ1RNGXhz0mTWvHhyrK7Do/Vp935LSftv7EoJpC6BMQw=
=QLDW
-----END PGP SIGNATURE-----

E
E
Efraim Flashner wrote on 25 Jun 2020 12:27
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 42036@debbugs.gnu.org)
20200625102730.GA21908@E5400
On Wed, Jun 24, 2020 at 11:36:57PM +0300, Oleg Pykhalov wrote:
Toggle quote (6 lines)
> ‘mount -t fuse -o rw,allow_other,debug sshfs#user@host: /mnt’ which
> could be used byself or by ‘autofs’ cannot find ‘ssh’ and ‘sshfs’
> binaries. A workaround are symlinks:
> /bin/ssh -> /gnu/store/...-openssh-8.3p1/bin/ssh
> /bin/sshfs -> /gnu/store/...-sshfs-2.10/bin/sshfs

I'm not clear on the usage of sshfs, but I just tried 'sshfs
efraim@other-machine: mnt/' and it worked without any issues.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl70fA8ACgkQQarn3Mo9
g1Gmhw//See/ShLUnY/JYsJvljmUz2XVykUF8G9qNlHykf5fseUjz0wHaDX0Kwij
XfMZKuquZ64DHD9mp3DPPJSDoPgjHT0s9dLDw8zM/I6RTj4fsKl8uB0QrX5ek9Yl
l0E5XSAiktSxbCH4uRDl49bWcvDe2Vj8e8ix1HqZ6OCDqrefvSJu5xRIDDNEVi+e
R+SgGJoFnC1I5ecWEAWzNCeJJZSRpoPIMdb+hlodEo49BzmiOrORFrqQvZwgN7VO
lTTURK4Ai+ZwOCGDr89G8cC1S+V5L2fQnj7KlEPr4jO679ybp7FdUju+0VzWnoBa
R4vFu/3T6eP5XFWgQoiFQw3tncIv4d65dOhypjx/0JnjVCEI8kNOe8/ZE+zu895k
ePzqYvpBTv9ly+FNzkiNR9PeMJmCIISmrJ7wIhMFv3eTGcfn4cCjKhTzDg5ZnReN
+jLRVIQo4/QLfogQx4HgJ17Oxg64dAqEM9KQxqJ7EnZwajzNjxK95qVRZ+tVtDyU
jl3dzBfFttg7tFA27LsFT2uJx1Lr88sbKJiAoBgWm5e8TPtvHkoKI3X6yCZ0srdS
1N6UDKh2BRY8+fCYF4Ly7R9Sc2toeMx8CJqnHklJumwlvbpFTBrODLDMMn6ec5pg
nba9+An+MsdcjCRskRs8Qppioxcs6atYiwFuzCk7X93OS/bLsGg=
=+vSA
-----END PGP SIGNATURE-----


T
T
Tobias Geerinckx-Rice wrote on 25 Jun 2020 14:46
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87bll7b9e1.fsf@nckx
Efraim Flashner ???
Toggle quote (3 lines)
> I'm not clear on the usage of sshfs, but I just tried 'sshfs
> efraim@other-machine: mnt/' and it worked without any issues.

Right. The bug is mount(8) not finding it because it(?) only
looks in /bin, apparently. This poses a problem with e.g. autofs.

However, Oleg: are you sure it looks *only* in /bin? Did you
install ‘sshfs’ to your user profile (‘guix install’ or a
manifest) or system profile (the ‘packages’ field of your
‘operating-system’)? Try the latter. See ‘Scheme Procedure:
udisks-service’ in the (guix)Desktop Services section of the
manual.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXvSctgAKCRANsP+IT1Vt
eUP2AQCFz4l883CDIexIayCfGzcjT4d4ZtTjGLZCMaaua7OWFAD/euEf/NWm55Cu
4vaTuROBqgVpM15OHPLU4h2YRQD8Qgw=
=NHr0
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 26 Jun 2020 08:01
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
877dvujrha.fsf@gmail.com
Hi,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

Toggle quote (11 lines)
> Efraim Flashner ???
>> I'm not clear on the usage of sshfs, but I just tried 'sshfs
>> efraim@other-machine: mnt/' and it worked without any issues.
>
> Right. The bug is mount(8) not finding it because it(?) only looks in /bin,
> apparently. This poses a problem with e.g. autofs.
>
> However, Oleg: are you sure it looks *only* in /bin? Did you install ‘sshfs’
> to your user profile (‘guix install’ or a manifest) or system profile (the
> ‘packages’ field of your ‘operating-system’)?

I tried to install in Guix system profile via ‘packages’ field. No
success to run mount.

Then I added to ‘services’ field:
Toggle snippet (6 lines)
;; mount -t fuse and autofs
(extra-special-file "/bin/sshfs"
(file-append sshfs "/bin/sshfs"))
(extra-special-file "/bin/ssh"
(file-append openssh "/bin/ssh"))
which works without problems.

I didn't have an idea to install them in non-priveleged user profile,
because I tested with a ‘root’ account.

Here is a ‘mount -t‘ strace:
Toggle snippet (15 lines)
oleg@guixsd ~$ mount -t fuse -o rw,allow_other sshfs#oleg@workstation:/home/oleg /tmp/f
/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh: sshfs: command not found

execve("/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh", ["/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh", "-c", "'sshfs' 'oleg@workstation:/home/oleg' '/tmp/f' '-o' 'rw,allow_other,dev,suid'"], 0x961430 /* 74 vars */) = 0
...
stat(".", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/local/bin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/sbin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
stat("/usr/bin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
stat("/usr/sbin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
stat("/bin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
stat("/sbin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
stat(".", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("./sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such file or directory)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl71jyEACgkQFn+OpQAa
+pyjFRAAhUR2xPd6i+0KZNroQvyHaq8i2AXykW3iE42ryngHTNwqZbqz3e+v738N
Sfp+1QwrX1CwOterzznBc/I3jA3YGmg4pzMgOQ8COnyytLe7h7eOUFNNSeiFmuDE
KhP0S50rXxhw71bTfVUE8buYh6Vw+Jrjhfw26YxwvIbW+t54fuIHAZD0BcrbI3/2
Uc87IoZoKRKA3xjMfmkjoctMQBuEQBny2hS+hsc9SkpedvIVj/MrJpFjQ7DJHBS8
sJE/ZtNmF6XRKOhbBJpqMDlQWaMqqiheRqH5RPneMs2PQneB6SYSwtPmG5eclsxd
hU/wpqdrKOi9FR2uU7pU6gn6kXatfk1e6/Q/BC8VgI756fyqZX6JZkKYqgm2Xegl
COA0DK/TPqF8DgCjeQOtqLvziOExBO7Or58KF/I7b8KXkd5jD25iI61v2GR1hGpR
NrV06CmM1s+LvTUr8kMDjEcXTzoB8G6UM9tnB8BGcroVZUG+Gc7jbivqJom3HJkz
V3HmVmVnC8PYrfW/2Xz0BiaxsfGfTl5SY6XIS1r2qLQaatSUTr7UETndqel9MdsN
cv10Bgq8YQQMEJeNtkfSxbT02CXyTtMGAOJqWORv0We1igE/Lg70/ABUTLz5lYQS
QQSB20vNQs38sMRSdR/71pVyYeDVViI4xU+i1Ut/QKd6rW3maec=
=ifFa
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 28 Jun 2020 13:49
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87r1tzquk9.fsf@nckx
Oleg Pykhalov ???
Toggle quote (3 lines)
> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>> However, Oleg: are you sure it looks *only* in /bin?

[…]

Toggle quote (32 lines)
> Here is a ‘mount -t‘ strace:
> --8<---------------cut
> here---------------start------------->8---
> oleg@guixsd ~$ mount -t fuse -o rw,allow_other
> sshfs#oleg@workstation:/home/oleg /tmp/f
> /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh:
> sshfs: command not found
>
> execve("/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh",
> ["/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh",
> "-c", "'sshfs' 'oleg@workstation:/home/oleg' '/tmp/f' '-o'
> 'rw,allow_other,dev,suid'"], 0x961430 /* 74 vars */) = 0
> ...
> stat(".", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
> stat("/usr/local/bin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No
> such file or directory)
> stat("/usr/local/sbin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No
> such file or directory)
> stat("/usr/bin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such
> file or directory)
> stat("/usr/sbin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such
> file or directory)
> stat("/bin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such
> file or directory)
> stat("/sbin/sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such
> file or directory)
> stat(".", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
> stat("./sshfs", 0x7ffed0ac1c90) = -1 ENOENT (No such
> file or directory)
> --8<---------------cut
> here---------------end--------------->8---

Thanks! This part comes from mount.fuse, right?

mount calls mount.fuse with $PATH unset. mount.fuse calls
<bash-minimal>/bin/sh -c sshfs …, which uses

/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.

by default. Not very useful on Guix Systems.

I'm considering the best place to fix this: util-linux (probably),
fuse (it would only affect mount.fuse, but maybe we want that kind
of control), or bash (almost certainly not).

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXviDxgAKCRANsP+IT1Vt
ed8wAQCAh2DYh48K9/5svDD6vwyNUNf0NgXWwS3qUGU/uLT3VwEA8C7BgtX0524o
XwfAB0vmfKRDvxPwnH6JD6DdskPsqQg=
=pz4R
-----END PGP SIGNATURE-----

M
M
Michael Rohleder wrote on 16 May 2022 08:51
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 42036@debbugs.gnu.org)
8735haotq0.fsf@rohleder.de
Oleg Pykhalov <go.wigust@gmail.com> writes:
Toggle quote (3 lines)
> I tried to install in Guix system profile via ‘packages’ field. No
> success to run mount.

For me, the trick was to install fuse in the system profile (to find
mount.fuse3).

--
Some people claim that the UNIX learning curve is steep, but at least you
only have to climb it once.
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCAAvFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAmKB9IcRHG1pa2VAcm9o
bGVkZXIuZGUACgkQfHr/vv7yyyVr7Af/XF5q2IMSovratMgHJHKLPIFxOjd6MWkR
d6SOAa4bFh0vLlgU888EEVT8TzJ5Sr3oTeKjD+ECAcqKWFYRk1D4zixH8nTgy92q
wC1C2BOkwRA8g1NuSu6ckeXPH3nSAiFvSIJmyGPxsC1S+q6/nXwwx+626j37ErIu
mEZDQf7gI9jed9QZ5N3NPklIiuifpIzSnUuqLMuO/lAbdFmlEGOsgYMwapr8KNl5
Bv4YRXadmze/TD4z2I9Z/qx3o/uX3z4mqHugrHX7jxWdYm6wIhbVGxSkMhbEm9n/
dBzkEeckHW7IjYy+lqTdy0VlKmwGV1jgyYFUTzWnqJksc1DxHwc4fg==
=oJzL
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 42036@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 42036
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch