Setting up WebDAV

Hi all

I need help setting up webdav storage, preferably system wide as all users should access it.

So far I got

(use-modules 
  ...
  (gnu packages file-systems)
  ...)

...

(file-system
  (mount-point "/mnt/cloud")
  (device "https://dav.mailbox.org/servlet/webdav.infostore")
  (type "davfs")
  (mount? #f))

which at least reconfigures the system and sets up /etc/fstab (I’m going to worry about the correct options and auth later) but when I try to

mount /mnt/cloud

it says Unkown filesystem davfs, but I don’t know what the correct way of setting up davfs2 would be.

Nvm got it working, it’s a pain tho

(use-modules
 ...
 (gnu packages file-systems)
 ...)

...

(operating-system
 ...
 (file-systems 
  (cons*
   ...
   (file-system
   (mount-point "/mnt/cloud")
    (device "<webdav url like the one see above>")
    (type "davfs")
    (mount? #f)
    (options "user"))
   ...))
 ...
 (setuid-programs
  (cons*
   (setuid-program (program (file-append davfs2 "/sbin/mount.davfs"))))
   %setuid-programs)))

then you gotta put

dav_group       users

into /etc/davfs2/davfs.conf. Or like a davfs2 group but then you need to declare that as well obvs

Plus the files ~/.davfs2/davfs2.conf and ~/.davfs2/secrets need to be created manually for every user that wants to mount even if you don’t use them, they must exist and can’t be created automatically because of a bug in the package declaration.

I’ma create a patch if I can figure out how that works lol because some of the stuff in the package declaration of davfs2 dont make sense (to me at least).

Hope it saves some troble :+1:

This isn’t relevant to me, but welcome, and thanks for sharing the solution.