Sshfs-fuse requires fuse

  • Done
  • quality assurance status badge
Details
5 participants
  • outlook user
  • Andreas Enge
  • Claes Wallin (韋嘉誠)
  • Ludovic Courtès
  • Mark H Weaver
Owner
unassigned
Submitted by
Andreas Enge
Severity
normal

Debbugs page

Andreas Enge wrote 10 years ago
(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
Claes Wallin (韋嘉誠) wrote 10 years ago
(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
Mark H Weaver wrote 10 years ago
(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
Claes Wallin (韋嘉誠) wrote 10 years ago
(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
Ludovic Courtès wrote 9 years ago
(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’.
Ludovic Courtès wrote 9 years ago
control message for bug #21142
(address . control@debbugs.gnu.org)
87poytm4sv.fsf@gnu.org
close 21142 0.9.0
Ludovic Courtès wrote 9 years ago
(address . control@debbugs.gnu.org)
87r3j9m4t7.fsf@gnu.org
tags 21142 wontfix
Claes Wallin (韋嘉誠) wrote 9 years ago
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
Ludovic Courtès wrote 9 years ago
(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’.
Claes Wallin (韋嘉誠) wrote 9 years ago
(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
Ludovic Courtès wrote 9 years ago
(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’.
Claes Wallin (韋嘉誠) wrote 9 years ago
(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
outlook user wrote 4 months ago
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
AS8P251MB085458A3CBAEFEBEACDC51D7975E2@AS8P251MB0854.EURP251.PROD.OUTLOOK.COM
unarchive 21142
outlook user wrote 4 months ago
AS8P251MB0854D6BBE4E275052E246F85975E2@AS8P251MB0854.EURP251.PROD.OUTLOOK.COM
That workaround worked in 2014, but now "libfuse" seems to search under "/usr/bin" and not "/run/setuid-programs". The `DFUSERMOUNT_DIR` modification doesn't seem to work anymore. I think to reproduce all what is needed is `strace` with follow forks to see the software seeking "/usr/bin." And personally, I use an "AppImage" to invoke fuse that will seek for `fusermount3`

The author of libfuse will push an update in the future for libfuse to give up upon searching binaries by itself and only relying on $PATH simply, but that's not for now...
outlook user wrote 4 months ago
AS8P251MB08540FEAB2CBBE1C3EC883C6975E2@AS8P251MB0854.EURP251.PROD.OUTLOOK.COM
That workaround worked in 2014, but now "libfuse" seems to search under "/usr/bin" and not "/run/setuid-programs". The `DFUSERMOUNT_DIR` modification doesn't seem to work anymore. I think to reproduce all what is needed is `strace` with follow forks to see the software seeking "/usr/bin." And personally, I use an "AppImage" to invoke fuse that will seek for `fusermount3`

The author of libfuse will push an update in the future for libfuse to give up upon searching binaries by itself and only relying on $PATH simply, but that's not for now...
Attachment: file
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 21142
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help