[Guide] Mount Nextcloud (WebDAV) folders locally with davfs

I dont need syncing, my NAS has a 2TB HDD and is almost full. My Sony X Compact has 32gb + 64GB MicroSD, so not enough Space for full sync but with davfs2 luckily not necessary. Thankfully most Apps allow save Big Data on MicroSD, for example the Offline Maps of Pure Maps.

I am still surprised how brave the X Compact is in terms of Speed. Its not that slow you would expect from a End 2016 Device. I spend it a new original Battery, now its last 36 - 45 hours. The Sony Batterys have very good Build Quality and last very long in Lifetime. Thats maybe one Reason why Sony Smartphones are a little bit more Expensive like the Competition.

What I meant is that rclone has, in addition to all its syncing features, a mount function which works almost exactly like davfs (but can mount more than just DAV but any backend).

2 Likes

Does rclone mount deal with samba as a backend? I’m reading now, but suspect you will be faster.

Ah, got it: rclone/backend/smb at master · rclone/rclone · GitHub

Yes, or rather

1 Like

Ah, may not work for me: This relies on go-smb2 library for communication with SMB protocol.

Q: Does WebDAV mirror the whole content of the netdrive to the Sailfish phone and use huge memory space on the phone? Or does it only access the netdrive and show it’s content and copies to the phone only on request?

If it’s a mount, it just shows the contents and shouldn’t copy anything. Did you mean a mount or a sync?

1 Like

As I understood @nephros in post # 1, it’s a mount, and that’s what I want.

Yes, the second (plus a bit of caching).

There is no persistent storage.
If you unmount it it’s “gone” :wink:

That is true for both davfs and rclone mount.

1 Like

It’s gone as a mount! But the storage remains persistent, where ever it was. If you write to that mount and unmount it, the data you wrote to it will persist.

1 Like

Success! Everything works like a charm!

I did exactly what @nephros wrote from step 1b (chum was yet installed) to step 8 using a Nextcloud account. Naturally, with tears in my eyes, I had to change nemo into defaultuser, but the rest was C+P and worked at the first try! It’s a little bit slow and it doesn’t refresh directory info realtime, but in general it does exactly what I want!

Thank you so much @nephros and @poetaster

1 Like

Cool! @nephros gets the credit. I was just snooping !

1 Like

Unfortunately I can’t mount or umount as defaultuser any more! It only works in terminal as devel-su, and then i get a lot of error messages, e.g.

/sbin/mount.davfs: Warnung: der Server kann Dateien nicht sperren

but despite it still works as long as I mount/umount as devel-su in terminal. So, not completely damaged and still hope to make it running for daily driving sometimes.

edit: after the first crash i did deinstall everything and tried to reinstall davfs2 again following @nephros suggestions # 2 .There came some error messages and reinstallation was not possible. So I installed the package with Storeman, davfs2 version 1.5.6-1 again. Is this the right version?

That error about locking is normal and I thnk harmless.

About the OR vs Chum version I’ll have to check what changed.

Are you saying 1.5.x (openrepos) works fine but 1.6.x (chum) does not?

The OR version currently doesn’t work on the Xperia 10, but this may also have other reasons, will say maybe i’ve made some mistakes. Tomorrow I will check again all details.

On the Volla it reported ‘package is yet installed’, so I did not install any package but only create the mountpoint and do the rest until # 8 in the list.

davfs is not listed in Settings/product info/installed packages. edit: on both Xperia 10 and Volla.
(deleted outdated info) But it’s working on the Volla. But it is SLOW!

edit: on X10 it’s version davfs2-1.6.1-1.4.1.jolla.armv7hl ,
on Volla it’s version davfs2-1.6.1-1.4.1.jolla.aarch64

edit: On X10 i deleted the ~/.davfs folder, deinstalled the package with pkvon, and then reinstalled again following # 1b to 8 and now it’s working again.

Thank you all!

For using rclone, @fingus has written a separate guide:

1 Like

just my few hints:
defaultuser instead of nemo

for mailbox.org use this https://dav.mailbox.org/servlet/webdav.infostore
secrets is located for me in /etc/davfs2 (did install via chum)

Yes that is the system-wide file. Note that things in the root partition are not encrypted, and it’s better to store secrets in the ~/.davfs2 per-user directory. (The original post mentions ~/davfs2 which is wrong, but I can’t edit the post any more.)

~/.davfs2 should be created automatically by running the mount command at least once.

Also, version 1.7.0 is now available on chum since a day or so.

1 Like

thanks for the info regarding encryption
i will change that then to ~/.davfs2

2 Likes