Open-Xchange is an all-in-one groupware solution, providing not only email, but also a CalDAV calendar, tasks, a file store or InfoStore and an online document editor. All shareable with other users. The InfoStore is used to save documents online, in the cloud. This article is about accessing and mounting your Open-Xchange remote WebDAV InfoStore file share on Linux, with mount.davfs or the Dolphin GUI file manager.
Your Open-Xchange InfoStore (OX Drive) is a regular WebDAV share at /servlet/webdav.infostore. Install davfs2, add a noauto,user line to /etc/fstab, store your credentials in ~/.davfs2/secrets, and mount it after boot from /etc/rc.local.
Your user account needs the right permissions. As the Open-Xchange documentation puts it:
OX Drive is enabled for all users that have the capability com.openexchange.capability.drive.
Users with OX Drive enabled must also have the InfoStore permission, and since version 7.6.0 the default configuration enforces this. See Enabling OX Drive for Users.
Mounting and accessing Open-Xchange WebDAV InfoStore on Linux
Mounting and accessing your Open-Xchange InfoStore or OX Drive is no different from other WebDAV resources and is quite easy:
- create a mount point:
$ sudo mkdir /media/ox - use
mount.davfsto mount a WebDAV share:
$ sudo mount.davfs https://open-xchange.example.com/servlet/webdav.infostore /media/ox
[sudo] password for user:
Please enter the username to authenticate with server https://open-xchange.example.com/servlet/webdav.infostore or hit enter for none.
Username: emailaddress@example.com
Please enter the password to authenticate user emailaddress@example.com with server
https://open-xchange.example.com/servlet/webdav.infostore or hit enter for none.
Password: ...
Your Open-Xchange InfoStore is now available on /media/ox.
Automatically mount your InfoStore/OX Drive folder with WebDAV
In order to access an Open-Xchange InfoStore WebDAV share as a filesystem, you'll need to install the davfs2 package. It's in the repositories by default. Then, add a line to your /etc/fstab file to make mounting easier. Note we are specifying noauto here, we will perform the automatic mounting step later. /etc/fstab is often processed before network initialisation, and therefore an automatic mount here will fail.
https://open-xchange.example.com/servlet/webdav.infostore /media/ox davfs noauto,user 0 0
Add your user to the correct group:
usermod -a -G davfs2 your-username
And now you should be able to mount your share and work with your files. You'll be prompted for your username and password:
mount /media/ox
umount /media/ox
Saving OX InfoStore mount credentials
You might find it inconvenient to have to type in your username and password every time you want to mount your OX Drive. It's a hurdle which needs to be overcome if you want to have your WebDAV share mounted automatically.
davfs2 uses the /home/your-username/.davfs2/secrets file for storing your logon credentials. You simply need to create this file with the correct permissions and then provide the host, username and password details:
touch /home/your-username/.davfs2/secrets
chmod 0600 /home/your-username/.davfs2/secrets
echo "https://open-xchange.example.com/servlet/webdav.infostore <username> <password>" > /home/your-username/.davfs2/secrets
After this step, you will be able to mount your share without providing a username and password.
Because you can't mount an InfoStore WebDAV share until after the network connection has been established, you can't use the auto option in your /etc/fstab file. Instead, you can use one simple command to mount your Open-Xchange InfoStore (OX Drive) share automatically.
Your /etc/rc.local file is executed after boot, and so is an excellent place to provide the functionality we are looking for. Add:
mount -a
# make sure this command is above the exit 0 command
Yes, rc.local is still an option, even with systemd (Ask Ubuntu, Wayback Machine). Just create the file if it's not there.
GUI file manager, like Dolphin
In a GUI file manager like Dolphin, you may enter the URI webdav://open-xchange.example.com/servlet/webdav.infostore and authenticate with your Open-Xchange account credentials (email address and password) to access your InfoStore.
In GNOME Nautilus, use dav:// or davs:// as protocol scheme.
Managing Open-Xchange yourself? Here is how to restore a deleted Open-Xchange context.