You are not logged in.

#1 2025-01-13 21:16:28

P_Daddy
Member
Registered: 2019-07-08
Posts: 5

[SOLVED] mount -t fuse results in "-o: command not found"

I'm using autofs with a custom configuration to automount hosts over SSH. The map file looks like this:

* -fstype=fuse,rw,allow_other,uid=$UID,gid=$GID,noatime,nosuid,nodev,workaround=rename  :/etc/autofs/ssh/cmd\#$USER

The script at /etc/autofs/ssh/cmd will generate an sshfs command to effect the connection. This all works beautifully. Well, it did until this morning, when I updated my system. Now, it seems that mount is broken. But maybe it just changed in an incompatible way, and I need to change my map.

The short story is that my /etc/autofs/ssh/cmd script never gets called, because when autofs calls "mount -t fuse -o ...", I get the following error:

/bin/sh: line 1: -o: command not found

After a lot of debugging and tracing, I found that autofs is generating a call to mount similar to this:

mount -t fuse3 -o rw,allow_other,uid=1000,gid=1000,noatime,nosuid,nodev,workaround=rename /etc/autofs/ssh/cmd\#my_user_name /my/configured/path

This command (with sudo in front of it) generates the above error. But a much shorter example works for a minimal reproduction:

sudo mount -t fuse3 -o rw echo x

On one of my machines that I haven't updated recently, that command outputs "x -o rw,dev,suid". But on the machine that I updated this morning, it errors with the same error as above, "/bin/sh: line 1: -o: command not found".

Running it with strace reveals that the way mount invokes mount.fuse has changed. On my out-of-date machine, it makes this call:

/usr/bin/mount.fuse3 echo x -o rw

And if you run that directly, you should find that it works fine.

But on my updated machine, it makes this call instead:

/usr/bin/mount.fuse3 -o rw echo x

Run that directly, and you'll get the error above. And if you simply run mount.fuse3 without any arguments, its usage text hints that the above call is invalid:

usage: mount.fuse3 type#[source] destination [-t type] [-o opt[,opts...]]

So what changed recently that's causing mount to invoke mount.fuse3 the wrong way? And more importantly, is there anything I can do about it?

Last edited by P_Daddy (2025-01-14 21:29:41)

Offline

#2 2025-01-14 01:27:45

blacklight
Member
Registered: 2016-04-06
Posts: 4

Re: [SOLVED] mount -t fuse results in "-o: command not found"

I can confirm that the issue occurs for me too after the latest upgrade.

Offline

#3 2025-01-14 13:06:13

brauliobo
Member
Registered: 2008-07-29
Posts: 17

Re: [SOLVED] mount -t fuse results in "-o: command not found"

same here but for sshfs mounts

Offline

#4 2025-01-14 17:40:49

brauliobo
Member
Registered: 2008-07-29
Posts: 17

Re: [SOLVED] mount -t fuse results in "-o: command not found"

fixed after the last update:
```
cryptsetup-2.7.5-2  lib32-util-linux-2.40.4-1  libnbd-1.20.3-3  systemd-257.2-2  systemd-libs-257.2-2  systemd-sysvcompat-257.2-2                   
            util-linux-2.40.4-1  util-linux-libs-2.40.4-1
```

Offline

#5 2025-01-14 21:29:12

P_Daddy
Member
Registered: 2019-07-08
Posts: 5

Re: [SOLVED] mount -t fuse results in "-o: command not found"

Can confirm, util-linux-2.40.4-1 fixes my problem. Closing this issue.

Offline

Board footer

Powered by FluxBB