New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mounting davfs fails #507

Closed
rebootl opened this Issue Jul 7, 2015 · 9 comments

Comments

4 participants
@rebootl

rebootl commented Jul 7, 2015

On Debian 8.

$ systemctl --version
systemd 215
+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR
$ uname -a
Linux pingu-ltsp 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux
$ sudo mount.davfs --version
davfs2 1.5.2  <http://savannah.nongnu.org/projects/davfs2>
[...]

systemd uses "-n" mount option. This is not understood by davfs and mounting fails.

Mount unit is created by fstab entry (systemd-fstab-generator(8)).

Journal (sorry output is partially german):

Jul 07 14:23:36 pingu-ltsp systemd[1]: Mounting /mnt/webdav/Kivitendo_revamp...
Jul 07 14:23:36 pingu-ltsp mount.davfs[7248]: davfs2 1.5.2
Jul 07 14:23:36 pingu-ltsp mount[7247]: /sbin/mount.davfs: Ungültige Option -- n
Jul 07 14:23:36 pingu-ltsp mount[7247]: unbekannte Option nofail.
Jul 07 14:23:36 pingu-ltsp mount[7247]: Aufruf:
Jul 07 14:23:36 pingu-ltsp mount[7247]: mount.davfs -V, --version  : Versionsinformation anzeigen
Jul 07 14:23:36 pingu-ltsp mount[7247]: mount.davfs -h, --help     : diese Hilfe anzeigen
Jul 07 14:23:36 pingu-ltsp mount[7247]: Um eine WebDAV-Resource zu einzuhängen, sollte mount.davfs nicht direkt
Jul 07 14:23:36 pingu-ltsp mount[7247]: aufgerufen werden; stattdessen sollte „mount” benutzt werden.
Jul 07 14:23:36 pingu-ltsp mount[7247]: mount <mountpoint>  : oder
Jul 07 14:23:36 pingu-ltsp mount[7247]: mount <server-url>  : hänge die WebDAV-Resource entsprechend den
Jul 07 14:23:36 pingu-ltsp mount[7247]: Angaben in /etc/fstab ein.
Jul 07 14:23:36 pingu-ltsp mount[7247]: mount -t davfs <server-url> <mountpoint> [-o Optionen]
Jul 07 14:23:36 pingu-ltsp mount[7247]: : hänge die WebDAV-Resource <server-url>
Jul 07 14:23:36 pingu-ltsp mount[7247]: in Verzeichnis <mountpoint> ein. Nur root
Jul 07 14:23:36 pingu-ltsp mount[7247]: darf dies tun. Optionen ist eine durch
Jul 07 14:23:36 pingu-ltsp mount[7247]: Kommas unterteilte Liste von Optionen.
Jul 07 14:23:36 pingu-ltsp mount[7247]: Mögliche Optionen:
Jul 07 14:23:36 pingu-ltsp mount[7247]: conf=        : absoluter Pfad der Benutzer-Konfigurationsdatei
Jul 07 14:23:36 pingu-ltsp mount[7247]: uid=         : Besitzer des Dateisystems (Name oder numerische ID)
Jul 07 14:23:36 pingu-ltsp mount[7247]: gid=         : Gruppe des Dateisystems (Name oder numerische ID)
Jul 07 14:23:36 pingu-ltsp mount[7247]: file_mode=   : Standard-Rechte für Dateien (oktal)
Jul 07 14:23:36 pingu-ltsp mount[7247]: dir_mode=    : Standard-Rechte für Verzeichnisse (oktal)
Jul 07 14:23:36 pingu-ltsp mount[7247]: ro           : nur Lesen
Jul 07 14:23:36 pingu-ltsp mount[7247]: rw           : Lesen und Schreiben
Jul 07 14:23:36 pingu-ltsp mount[7247]: [no]exec     : Ausführen von Programmdateien ist (nicht) erlaubt
Jul 07 14:23:36 pingu-ltsp mount[7247]: [no]suid     : gesetzte suid- und sgid-Bits sind (nicht) wirksam
Jul 07 14:23:36 pingu-ltsp mount[7247]: [no]grpid    : neue Dateien erhelten die gid des übergeordneten
Jul 07 14:23:36 pingu-ltsp mount[7247]: Verzeichnisses
Jul 07 14:23:36 pingu-ltsp mount[7247]: [no]_nedev   : benötigt (keine) Netzwerkverbindung
Jul 07 14:23:36 pingu-ltsp sudo[7233]: pam_unix(sudo:session): session closed for user root
Jul 07 14:23:36 pingu-ltsp systemd[1]: mnt-webdav-Kivitendo_revamp.mount mount process exited, code=exited status=1
Jul 07 14:23:36 pingu-ltsp systemd[1]: Failed to mount /mnt/webdav/Kivitendo_revamp.
Jul 07 14:23:36 pingu-ltsp systemd[1]: Unit mnt-webdav-Kivitendo_revamp.mount entered failed state.

Mounting manually works.

Should I report to davfs instead ?

@arvidjaar

This comment has been minimized.

Show comment
Hide comment
@arvidjaar

arvidjaar Jul 7, 2015

Contributor

You seem to have too old mount; this is generic option which should not be forwarded to davfs at all.
-n, --no-mtab Mount without writing in /etc/mtab. This is necessary for example when /etc is on a read-only filesystem.

Contributor

arvidjaar commented Jul 7, 2015

You seem to have too old mount; this is generic option which should not be forwarded to davfs at all.
-n, --no-mtab Mount without writing in /etc/mtab. This is necessary for example when /etc is on a read-only filesystem.

@rebootl

This comment has been minimized.

Show comment
Hide comment
@rebootl

rebootl Jul 7, 2015

Thx for your reply!

$ mount --version
mount aus util-linux 2.25.2 (libmount 2.25.0: selinux, assert, debug)

This ?

Well as mentioned it's Debian 8 stable, so should I report there ?
Edit: Don't see this in the changelogs (https://www.kernel.org/pub/linux/utils/util-linux/)

rebootl commented Jul 7, 2015

Thx for your reply!

$ mount --version
mount aus util-linux 2.25.2 (libmount 2.25.0: selinux, assert, debug)

This ?

Well as mentioned it's Debian 8 stable, so should I report there ?
Edit: Don't see this in the changelogs (https://www.kernel.org/pub/linux/utils/util-linux/)

@arvidjaar

This comment has been minimized.

Show comment
Hide comment
@arvidjaar

arvidjaar Jul 7, 2015

Contributor

This version should be OK. Any chance you have multiple versions of mount hanging around?

Contributor

arvidjaar commented Jul 7, 2015

This version should be OK. Any chance you have multiple versions of mount hanging around?

@rebootl

This comment has been minimized.

Show comment
Hide comment
@rebootl

rebootl Jul 8, 2015

Hello.
Not that I would know of. We only installed packages. It seems two packages are around but they're the same version (Edit: mount and util-linux):

$ dpkg -l |grep mount
ii  davfs2                                1.5.2-1                              amd64        mount a WebDAV resource as a regular file system
ii  libmount1:amd64                       2.25.2-6                             amd64        device mounting library
ii  mount                                 2.25.2-6                             amd64        Tools for mounting and manipulating filesystems
$ dpkg -l |grep util-linux
ii  util-linux                            2.25.2-6                             amd64        Miscellaneous system utilities
ii  util-linux-locales                    2.25.2-6                             all          Locales files for util-linux
$
$ whereis mount
mount: /usr/sbin/mount.davfs /bin/mount /sbin/mount.ntfs-3g /sbin/mount.ntfs /sbin/mount.davfs /sbin/mount.nfs4 /sbin/mount.fuse /sbin/mount.nfs /sbin/mount.lowntfs-3g /usr/share/man/man2/mount.2.gz /usr/share/man/man8/mount.8.gz
$
$ sudo mount --version
mount aus util-linux 2.25.2 (libmount 2.25.0: selinux, assert, debug)

Could it use something else than mount for this maybe ?

rebootl commented Jul 8, 2015

Hello.
Not that I would know of. We only installed packages. It seems two packages are around but they're the same version (Edit: mount and util-linux):

$ dpkg -l |grep mount
ii  davfs2                                1.5.2-1                              amd64        mount a WebDAV resource as a regular file system
ii  libmount1:amd64                       2.25.2-6                             amd64        device mounting library
ii  mount                                 2.25.2-6                             amd64        Tools for mounting and manipulating filesystems
$ dpkg -l |grep util-linux
ii  util-linux                            2.25.2-6                             amd64        Miscellaneous system utilities
ii  util-linux-locales                    2.25.2-6                             all          Locales files for util-linux
$
$ whereis mount
mount: /usr/sbin/mount.davfs /bin/mount /sbin/mount.ntfs-3g /sbin/mount.ntfs /sbin/mount.davfs /sbin/mount.nfs4 /sbin/mount.fuse /sbin/mount.nfs /sbin/mount.lowntfs-3g /usr/share/man/man2/mount.2.gz /usr/share/man/man8/mount.8.gz
$
$ sudo mount --version
mount aus util-linux 2.25.2 (libmount 2.25.0: selinux, assert, debug)

Could it use something else than mount for this maybe ?

@poettering

This comment has been minimized.

Show comment
Hide comment
@poettering

poettering Jul 8, 2015

Member

@karelzak can you comment on this one? Is this something to fix in davfs or in util-linux?

(either way, I am pretty sure there's nothing to fix in systemd here, hence closing the ticket here)

Member

poettering commented Jul 8, 2015

@karelzak can you comment on this one? Is this something to fix in davfs or in util-linux?

(either way, I am pretty sure there's nothing to fix in systemd here, hence closing the ticket here)

@poettering poettering closed this Jul 8, 2015

@karelzak

This comment has been minimized.

Show comment
Hide comment
@karelzak

karelzak Jul 15, 2015

Contributor

It seems like mount.davfs bug.

The option "-n" is part of the mount helper API; see man mount, section EXTERNAL HELPERS.

@poettering BTW, why we need to execute mount(8) with -n (--no-mtab) if manager->running_as == MANAGER_SYSTEM?

We don't use /ect/mtab at all, and user-space staff is stored in /run/mount which is tmpfs. The option -n has been originally used by init scripts to call mount(8) on read-only root fs.

Contributor

karelzak commented Jul 15, 2015

It seems like mount.davfs bug.

The option "-n" is part of the mount helper API; see man mount, section EXTERNAL HELPERS.

@poettering BTW, why we need to execute mount(8) with -n (--no-mtab) if manager->running_as == MANAGER_SYSTEM?

We don't use /ect/mtab at all, and user-space staff is stored in /run/mount which is tmpfs. The option -n has been originally used by init scripts to call mount(8) on read-only root fs.

@rebootl

This comment has been minimized.

Show comment
Hide comment
@rebootl

rebootl Jul 20, 2015

Ok. Thx for your replies. I think I'll report to mount.davfs, referring back here.

Edit: davfs issue report: http://savannah.nongnu.org/support/?108850

rebootl commented Jul 20, 2015

Ok. Thx for your replies. I think I'll report to mount.davfs, referring back here.

Edit: davfs issue report: http://savannah.nongnu.org/support/?108850

@poettering

This comment has been minimized.

Show comment
Hide comment
@poettering

poettering Jul 23, 2015

Member

@karelzak might be left-over cruft, from when it was still using mtab. Happy to take a patch that drops it, if never bothers with mtab anymore. Thanks!

Member

poettering commented Jul 23, 2015

@karelzak might be left-over cruft, from when it was still using mtab. Happy to take a patch that drops it, if never bothers with mtab anymore. Thanks!

@karelzak

This comment has been minimized.

Show comment
Hide comment
@karelzak

karelzak Jul 28, 2015

Contributor

@poettering OK, pull request: #755

Contributor

karelzak commented Jul 28, 2015

@poettering OK, pull request: #755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment