Mount on Ubuntu Linux via webDAV

I recently signed up for a free 50gb account at At the time of this writing, does not have an application to sync files from a Linux machine to their servers. I followed this guide and this post to mount the service to a local directory. I did:

<pre class="src src-sh">sudo apt-get install davfs2

emacs -q -nw /etc/davfs2/secrets ## added the following to the end of the file: “ username password” mkdir /mnt/ ## added the following to /etc/fstab ## following equivalent to defaults except noauto instead of auto; /mnt/ davfs rw,suid,dev,exec,noauto,nouser,async,uid=vinh,gid=vinh 0 0

Now do sudo mount /mnt/ to have have it mounted. Note that the account will automatically mount at startup.

Input/Ouput error

If you get an input/output error when copying files to your folder, then add the following to your /etc/davfs2/davfs2.conf (per this post):

use_locks       0


I have the noauto option in /etc/fstab because I don’t want the directory to be mounted at boot time. Why? Mounting requires an internet connection, and a network cable might not always be plugged; a mount error would require manual intervention (Skip or Manual mount) at startup. Instead, we should automatically mount the directory whenever a network connection is made by placing the following script,

#! /bin/bash

mount /mnt/

as /etc/network/if-up.d/mountBoxDotNet; remember to make it executable with chmod +x.

Skip disk mount errors in Linux

I automatically mount disk drives using /etc/fstab. However, when I boot a system with a disk removed, the system will give a mount error, giving me the option to skip (S) or manually (M) mount the disk. This doesn’t work well for headless servers. To skip the mount errors during boot, this suggests using the nobootwait option in /etc/fstab. Examples can be found here. For me, I have something like the following:

/dev/sdb1       /h2tb           ext3    defaults,nobootwait             1       2
/dev/sdc1       /wd2tb          ext4    defaults,nobootwait             1       2