Sshfs-fuse requires fuse

  • Done
  • quality assurance status badge
Details
4 participants
  • Andreas Enge
  • Claes Wallin (???)
  • Ludovic Courtès
  • Mark H Weaver
Owner
unassigned
Submitted by
Andreas Enge
Severity
normal
A
A
Andreas Enge wrote on 27 Jul 2015 17:05
(address . bug-guix@gnu.org)
20150727150532.GA18963@debian
Hello,

when trying to execute sshfs from the sshfs-fuse package, I obtain
fuse: failed to exec fusermount: No such file or directory

I think that fuse should be a propagated input of sshfs-fuse.

Andreas
C
C
Claes Wallin (???) wrote on 27 Jul 2015 19:23
(name . Andreas Enge)(address . andreas@enge.fr)(address . 21142@debbugs.gnu.org)
CAGv_=BoqmMSKHkSzm6-Rc01r1TqTXA2iX55kmz9Y0d6gwmC9EA@mail.gmail.com
On 27-Jul-2015 5:06 pm, "Andreas Enge" <andreas@enge.fr> wrote:
Toggle quote (8 lines)
>
> Hello,
>
> when trying to execute sshfs from the sshfs-fuse package, I obtain
> fuse: failed to exec fusermount: No such file or directory
>
> I think that fuse should be a propagated input of sshfs-fuse.

Maybe it's less intrusive toward the user to wrap sshfs to add fuse to its
PATH?
Attachment: file
M
M
Mark H Weaver wrote on 28 Jul 2015 16:20
(name . Claes Wallin)(address . gnu@clacke.user.lysator.liu.se)
87wpxk2wjh.fsf@netris.org
Claes Wallin (???) <gnu@clacke.user.lysator.liu.se> writes:

Toggle quote (12 lines)
> On 27-Jul-2015 5:06 pm, "Andreas Enge" <andreas@enge.fr> wrote:
>>
>> Hello,
>>
>> when trying to execute sshfs from the sshfs-fuse package, I obtain
>> fuse: failed to exec fusermount: No such file or directory
>>
>> I think that fuse should be a propagated input of sshfs-fuse.
>
> Maybe it's less intrusive toward the user to wrap sshfs to add fuse to
> its PATH?

Or patch the reference to 'fusermount' to be an absolute path?

I haven't looked into this, so I don't know the feasibility of these
approaches, but in general I think that 'propagated-inputs' should be
avoided whenever there is a reasonable alternative.

What do you think?

Mark
C
C
Claes Wallin (???) wrote on 28 Jul 2015 21:27
(name . Mark H Weaver)(address . mhw@netris.org)
CAGv_=BpzwvcqdLWjJLYhfi60dFHpz0xGKY_Ju86KnVZcNYeAEA@mail.gmail.com
On Jul 28, 2015 4:21 PM, "Mark H Weaver" <mhw@netris.org> wrote:
Toggle quote (15 lines)
> Claes Wallin (???) <gnu@clacke.user.lysator.liu.se> writes:
> > On 27-Jul-2015 5:06 pm, "Andreas Enge" <andreas@enge.fr> wrote:
> >>
> >> Hello,
> >>
> >> when trying to execute sshfs from the sshfs-fuse package, I obtain
> >> fuse: failed to exec fusermount: No such file or directory
> >>
> >> I think that fuse should be a propagated input of sshfs-fuse.
> >
> > Maybe it's less intrusive toward the user to wrap sshfs to add fuse to
> > its PATH?
>
> Or patch the reference to 'fusermount' to be an absolute path?

That's even better!

Toggle quote (6 lines)
> I haven't looked into this, so I don't know the feasibility of these
> approaches, but in general I think that 'propagated-inputs' should be
> avoided whenever there is a reasonable alternative.
>
> What do you think?

Yeah, installing a package should cause the minimum amount of surprise.
Attachment: file
L
L
Ludovic Courtès wrote on 29 Nov 2015 12:18
(name . Mark H Weaver)(address . mhw@netris.org)
87si3pm4tm.fsf@gnu.org
Mark H Weaver <mhw@netris.org> skribis:

Toggle quote (16 lines)
> Claes Wallin (???) <gnu@clacke.user.lysator.liu.se> writes:
>
>> On 27-Jul-2015 5:06 pm, "Andreas Enge" <andreas@enge.fr> wrote:
>>>
>>> Hello,
>>>
>>> when trying to execute sshfs from the sshfs-fuse package, I obtain
>>> fuse: failed to exec fusermount: No such file or directory
>>>
>>> I think that fuse should be a propagated input of sshfs-fuse.
>>
>> Maybe it's less intrusive toward the user to wrap sshfs to add fuse to
>> its PATH?
>
> Or patch the reference to 'fusermount' to be an absolute path?

This what libfuse does by default in lib/mount.c:

Toggle snippet (7 lines)
static void exec_fusermount(const char *argv[])
{
execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv);
execvp(FUSERMOUNT_PROG, (char **) argv);
}

However, we explicitly patch it because in practice the ‘fusermount’
binary must be at least set-user-gid to fuse, per mount.fuse(8):

Toggle snippet (9 lines)
;; This hack leads libfuse to search for 'fusermount' in
;; $PATH, where it may find a setuid-root binary, instead of
;; trying solely $out/sbin/fusermount and failing because
;; it's not setuid.
(substitute* "lib/Makefile"
(("-DFUSERMOUNT_DIR=[[:graph:]]+")
"-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))

On GuixSD, this is addressed by having ‘fusermount’ setuid-root in
/run/setuid-programs, so things just work.

On foreign distros, there’s not much we can do: Users have to set add a
setuid ‘fusermount’ in their PATH.

Closing this bug as “wontfix.”

Ludo’.
L
L
Ludovic Courtès wrote on 29 Nov 2015 12:19
control message for bug #21142
(address . control@debbugs.gnu.org)
87poytm4sv.fsf@gnu.org
close 21142 0.9.0
L
L
Ludovic Courtès wrote on 29 Nov 2015 12:19
(address . control@debbugs.gnu.org)
87r3j9m4t7.fsf@gnu.org
tags 21142 wontfix
C
C
Claes Wallin (???) wrote on 29 Nov 2015 12:52
Re: bug#21142: Sshfs-fuse requires fuse
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAGv_=Bp4E=sVg_aKap3QGnsHS1fGqX89zfHu3f2Fn89BuBCpRQ@mail.gmail.com
On 29-Nov-2015 12:19 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:

Toggle quote (2 lines)
> However, we explicitly patch it because in practice the ‘fusermount’
> binary must be at least set-user-gid to fuse, per mount.fuse(8):
[ . . . ]
Toggle quote (8 lines)
> On GuixSD, this is addressed by having ‘fusermount’ setuid-root in
> /run/setuid-programs, so things just work.
>
> On foreign distros, there’s not much we can do: Users have to set add a
> setuid ‘fusermount’ in their PATH.
>
> Closing this bug as “wontfix.”

Ok, that's pretty clear then. Is this clear somewhere in the documentation?
Otherwise I suppose we should fix that.

--
/c
Attachment: file
L
L
Ludovic Courtès wrote on 29 Nov 2015 15:58
(name . Claes Wallin (???))(address . gnu@clacke.user.lysator.liu.se)
87k2p0luo3.fsf@gnu.org
"Claes Wallin (???)" <gnu@clacke.user.lysator.liu.se> skribis:

Toggle quote (16 lines)
> On 29-Nov-2015 12:19 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:
>
>> However, we explicitly patch it because in practice the ‘fusermount’
>> binary must be at least set-user-gid to fuse, per mount.fuse(8):
> [ . . . ]
>> On GuixSD, this is addressed by having ‘fusermount’ setuid-root in
>> /run/setuid-programs, so things just work.
>>
>> On foreign distros, there’s not much we can do: Users have to set add a
>> setuid ‘fusermount’ in their PATH.
>>
>> Closing this bug as “wontfix.”
>
> Ok, that's pretty clear then. Is this clear somewhere in the documentation?
> Otherwise I suppose we should fix that.

Regarding foreign distros, I suppose we could add a paragraph about FUSE
under “Application Setup”? Would you like to submit a patch against
guix.texi?

Thanks,
Ludo’.
C
C
Claes Wallin (???) wrote on 29 Nov 2015 17:41
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAGv_=Br4Mv_Wfg+pF1VFT=+9Q-wiWydOkPwZsYqwj1Wq=0MjMw@mail.gmail.com
On Nov 29, 2015 3:58 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:

Toggle quote (6 lines)
> >> However, we explicitly patch it because in practice the ‘fusermount’
> >> binary must be at least set-user-gid to fuse, per mount.fuse(8):
> > [ . . . ]
> >> On GuixSD, this is addressed by having ‘fusermount’ setuid-root in
> >> /run/setuid-programs, so things just work.

You mean under GuixSD this works automagically? Or only if fuse is
installed globally and indicated as setuid? (I forget how that works, but
I'll look into it, no need to describe in detail here)

Toggle quote (1 lines)
> > Ok, that's pretty clear then. Is this clear somewhere in the
documentation?
Toggle quote (6 lines)
> > Otherwise I suppose we should fix that.
>
> Regarding foreign distros, I suppose we could add a paragraph about FUSE
> under “Application Setup”? Would you like to submit a patch against
> guix.texi?

I would like to. I'll see when I get around to it, hopefully around New
Year's.

--
/c
Attachment: file
L
L
Ludovic Courtès wrote on 29 Nov 2015 18:01
(name . Claes Wallin (???))(address . gnu@clacke.user.lysator.liu.se)
874mg4kaek.fsf@gnu.org
"Claes Wallin (???)" <gnu@clacke.user.lysator.liu.se> skribis:

Toggle quote (10 lines)
> On Nov 29, 2015 3:58 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
>
>> >> However, we explicitly patch it because in practice the ‘fusermount’
>> >> binary must be at least set-user-gid to fuse, per mount.fuse(8):
>> > [ . . . ]
>> >> On GuixSD, this is addressed by having ‘fusermount’ setuid-root in
>> >> /run/setuid-programs, so things just work.
>
> You mean under GuixSD this works automagically?

Yes. ‘fusermount’ is part of ‘%setuid-programs’:


Ludo’.
C
C
Claes Wallin (???) wrote on 29 Nov 2015 18:24
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAGv_=Bp3UxPX+bcgM0ZH8EF3o=-OfjF1zTDbJuNuj=HrQkzs_Q@mail.gmail.com
On Nov 29, 2015 6:01 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:

Toggle quote (7 lines)
> >> >> On GuixSD, this is addressed by having ‘fusermount’ setuid-root in
> >> >> /run/setuid-programs, so things just work.
> >
> > You mean under GuixSD this works automagically?
>
> Yes. ‘fusermount’ is part of ‘%setuid-programs’:

Still, fuse needs to be installed on the OS if a user wants to install and
run sshfs. When I take a look at the docs, I'll keep this in mind.

--
/c
Attachment: file
?