autofs is passing -n to the mount if /etc/mtab is a symlink: https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git/tree/daemon/spawn.c#n589 davfs2 currently does not support -n, because it does check if mtab is a symlink and act accordingly without the "-n" flag, so it should just ignore it. The issue is reported upstream: https://savannah.nongnu.org/support/index.php?110191 Reproducible: Always Steps to Reproduce: I tried mounting with autofs: # grep dav /etc/autofs/auto.master /etc/autofs/auto.davfs /etc/autofs/auto.master:/mnt/davfs /etc/autofs/auto.davfs --timeout=60 --ghost /etc/autofs/auto.davfs:hidrive -fstype=davfs,rw :https\://webdav.hidrive.ionos.com/ $ grep sec $HOME/.davfs2/davfs2.conf secrets ~/.davfs2/sec $ cat $HOME/.davfs2/sec "https://webdav.hidrive.ionos.com/" "foobar" "foo123" Actual Results: Syslog: [automount] pidinfo requestor: pid:10847 comm:ls tgid:10847 uid:4728 euid:4728 gid:4728 egid:4728 [automount] pidinfo parent: pid:6301 comm:bash tgid:6301 uid:4728 euid:4728 gid:4728 egid:4728 [automount] attempting to mount entry /mnt/davfs/hidrive [automount] mount(generic): calling mount -t davfs -o rw https://webdav.hidrive.ionos.com/ /mnt/davfs/hidrive [automount] >> /sbin/mount.davfs: invalid option -- 'n' [automount] mount(generic): failed to mount https://webdav.hidrive.ionos.com/ (type davfs) on /mnt/davfs/hidrive [automount] failed to mount /mnt/davfs/hidrive
Concerned versions: net-fs/autofs-5.1.6 net-fs/davfs2-1.5.6
Same happens with sshfs.
Please report that upstream as well. I feel like this issue is really on autofs side like davfs2 developers said, even though they added a workaround on their code. Who is responsible for autofs, is that kernel.org ?
I have no clue. Actually, I've been trying to search it yesterday already. Only clue I have is the homepage: https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html Yeah. Which is dead. Doeasn't look good for autofs.
Confirmed with net-fs/autofs-5.1.6 : mount type fuse.sshfs does not support -n (--no-mtab) option, but autofs add automatically this one : automount[2489]: spawn_mount: mtab link detected, passing -n to mount automount[2489]: >> fuse: unknown option(s): `-n' Same with autofs-5.1.5-r2.