5

I want to mount a folder to sync with my Ubuntu One account. The only restriction is that I don't want to use the client provided. I use Arch Linux if it counts. And if you can provide a general solution for all WebDAV(??) resources it would be useful and good reference.

2

To mount a WebDAV resource as a drive in linux, you can use davfs2. In Debian-based distributions, this can be downloaded as the davfs2 package from the main repositories:

    # apt-get install davfs2

I wrote a blog entry about mounting a specific WebDAV resource using davfs2 a while ago. I will outline the relevant details here.

Once you have davfs2 installed on your system, you should be able to use the mount.davfs (or mount -t davfs) command on your machine. The syntax is

    mount -t davfs https://webdav-server.com/path/to/remote/dav /path/to/local/mountpoint

Depending on how your davfs2 install is configured, you may be able to mount as a normal user, or you may need to be root (or have superuser privileges). On my Ubuntu system, I added my username to the davfs2 group (adduser [my_username] davfs2) and set the suid bit (using dpkg-reconfigure) on mount.davfs so that I would not need to be root to mount WebDAV resources.

If you are going to be repeatedly mounting a particular WebDAV source, you can simplify the mounting process by adding an entry to /etc/fstab, for example

    https://webdav-server.com/path/to/remote/dav /path/to/local/mountpoint davfs noauto,defaults,uid=myusername,gid=myusergroup 0 0

You can further simplify the mounting process by storing your username and password for the WebDAV resource in ~/.davfs2/secrets in the following format:

    /path/to/local/mountpoint my_dav_username password

My setup had some particular quirks, the solutions to which are outlined in my blog post

4
  • Thank you, thank you, thank you. I will read it more carefully the these days and come back to accept your answer or give some feedback :) – py_script Apr 1 '12 at 20:48
  • 1
    You're welcome. This is the first time I've been able to actually provide a knowledgeable answer on here, rather than just asking questions! – James Womack Apr 2 '12 at 9:29
  • Hello again...thanks for your answer. It really works but unfortunately ubuntu one doesnt support webdav. Or I am doing something wrong... – py_script Apr 3 '12 at 20:50
  • 1
    I'm not sure about Ubuntu One -- never tried to use WebDAV with it before. There are other cloud services which support WebDAV which might be worth investigating. I believe Box has (unofficial) WebDAV support. I also think that WebDAV support can be added to Dropbox using DropDAV. – James Womack Apr 5 '12 at 12:25
3

Just following up here for others that might be interested in this - see Ubuntu's wiki page regarding the architecture. It is not possible to access Ubuntu One via WebDAV.

This provides remotely accessible disk space stored on Amazon S3. Rather than using an existing protocol (eg. FTP, SFTP, NFS, Webdav) access to this remote disk space is via an invented-here communication protocol called "ubuntuone-storageprotocol" based on Google Protocol Buffers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.