WebDav for Linux
Note: The features described in this article are available in all plans except the Light plan.
This guide explains how to set up Drive on Linux (Ubuntu, Lubuntu, Mint) and synchronise it with a local directory.
This setup offers similar features to the native OX Drive client on Windows.
Why set up synchronisation?
If you use a mobile device that is offline for long periods of time, this method allows you to continue working without an internet connection. As soon as the device is reconnected to the internet, synchronisation takes place automatically. This gives you two copies of your files – one version is stored online in your mailbox Drive, the other locally. This redundancy can help prevent data loss.
Setting up the drive on Linux – step by step
To enable synchronisation, you need two folders: one local and one online (the mailbox drive). In this example, the directories are:
/media/drivefor the online (mailbox) drive/home/username/drive-local/for the local directory
This way, the drive will be displayed in your file manager (e.g. Dolphin) and can be accessed directly.
If you want to strictly adhere to the Filesystem Hierarchy Standard (FHS), you can use a standard path such as /mnt/drive.
However, this may be less noticeable in your file manager.
If you are unsure, simply use the example path above.
Setting up WebDAV access on Linux (with davfs2)
Prerequisite: The following steps are performed in the Linux terminal. A text editor is also required to edit system files.
Step 1: Understanding important terminal commands
| Command | Description |
|---|---|
cd / | Change to the root directory |
cd .. | Go up one directory level |
cd /etc | Navigate directly to the /etc directory. |
ls -lah | List all files with details such as size and date. |
mkdir /home/xxx/new_folder | Creates a new directory |
Tip: After entering a few letters of a directory name, you can press the Tab key to automatically complete the path.
Step 2: Prepare the ‘fstab’ file.
Navigate to the /etc directory:
cd /etc
Open the fstab file with a text editor (nano is used as an example here):
sudo nano fstab
Add the following line at the end of the file:
davfs2
If davfs2 is not installed, install it via the Software Manager or via the terminal:
| Distribution | Installation command |
|---|---|
| Debian / Ubuntu | sudo apt install davfs2 |
| Fedora | sudo dnf install davfs2 |
| Arch Linux | sudo pacman -S davfs2 |
https://dav.mailbox.org/servlet/webdav.infostore/Userstore /media/drive davfs noauto,user,rw 0 0
Step 3: Verify that davfs2 is installed.
Open the Software Centre or package manager for your Linux distribution (e.g. Synaptic, GNOME Software, Discover) and search for:
davfs2
If this library is not available, please install it.

Figure 1: davfs2 configuration.
If davfs2 needs to be installed, the installer may ask whether the SUID bit should be set. Please answer ‘No’ or leave the checkbox unchecked. We will set this later.
Change the configuration file. /etc/davfs2/davfs2.conf
Navigate to the directory /etc/davfs2 and open the file davfs2.conf with a text editor in edit mode (e.g. with sudo nano davfs2.conf).
Adjust the following configuration parameters or add them if they are not already present:
| Parameter | Value | Description |
|---|---|---|
if_match_bug | 1 | Enables compatibility mode for certain WebDAV servers. |
use_locks | 0 | Disables file locking to avoid access conflicts. |
cache_size | 1 | Sets the size of the local cache in MB. |
table_size | 4096 | Size of the internal file mapping table, suitable for many files |
delay_upload | 1 | Enables delayed uploading to improve performance. |
gui_optimize | 1 | Optimises usage with graphical user interfaces. |
buf_size | 64 | Sets the size of the local buffer in KB. |
Note:: Other configuration lines that you do not need or do not want to overwrite should be commented out by inserting a # at the beginning of the line.
This ensures that only the intended settings are active.
Save username and password locally
Navigate to /etc/davfs2 and open the secrets file with a text editor in edit mode.
Add the following line to the /etc/davfs2/secrets file:
/media/drive mailboxname@mailbox.org password
Replace mailboxname@mailbox.org and password with your login details for your mailbox.
If your password contains special characters or spaces, it is recommended that you enclose it in double quotation marks to avoid misinterpretation.
To protect the file from unauthorised reading, set the correct permissions by entering the following command in a terminal:
sudo chmod 600 /etc/davfs2/secrets
Creating and automatically mounting the WebDAV directory when Linux starts up
Create the directory /media/drive with the following command:
sudo mkdir /media/drive
Now assign ownership rights to this directory. Replace xxx with your actual user name.
If you are unsure of your username, you can find it using the following command:
whoami
Here is the command to set the correct permissions:
sudo chown -Rv xxx:xxx /media/drive
You can now perform an initial test:
sudo mount -t davfs https://dav.mailbox.org/servlet/webdav.infostore/Userstore /media/drive
If this command is executed without error, your mailbox drive is now available locally on your computer.
To mount the directory automatically – i.e. to connect it every time the system restarts – you must add the mount command to your startup settings. In Ubuntu, for example, you can add the following command under LXQT Session Settings → Autostart:
mount /media/drive
In Linux Mint Cinnamon, this can be added in the settings under ‘Startup Applications’.
Adjusting user permissions
Here, you allow the non-privileged user you normally work with to mount the drive.
Set the SUID bit for the mount.davfs command:
sudo dpkg-reconfigure davfs2
(or for other distributions: sudo chmod u+s)
Note: Answer ‘Yes’ to the corresponding question.

Abbildung 2: Linux Mint Cinnamon.
Add the user to the davfs2 group:
sudo usermod -aG davfs2 username
Replace ‘username’ with the actual username you use to log in. If you don't know it, find it out by running the following:
whoami
Checking WebDAV access
After restarting Linux, the mailbox Drive should be accessible in a file manager under /media/drive. It may also appear as a drive on the desktop (see left side of the screenshot).
Synchronising with a local directory
Creating a local directory
Create a local directory. Replace xxx with your user name. If you are unsure, use the command whoami
An example path could be:
mkdir /home/xxx/drive-local
Inside /media/drive/, you will find a directory with the username registered in the mailbox, e.g. ‘Max Mustermann’. Copy the contents of this directory to /home/xxx/drive-local/.
Synchronisation with FreeFileSync
Users have recommended FreeFileSync as one of the best open source programmes for synchronising two directories. If one directory is a network directory, synchronisation with a local directory can be set up very easily.
The programme can be downloaded from https://freefilesync.org/ and extracted to a directory, e.g. /home/xxx/Programs/FreeFileSync. Replace xxx with your user name.
Note:: Extract .tar.gz files using the terminal command:
tar -xzvf FreeFileSync_XX.X.tar.gz
Extracting can usually also be done via the file manager by double-clicking on the file.
The programme can then be started via the executable file:
/home/xxx/Programs/FreeFileSync/FreeFileSync
(You may need to install the libgtk2.0 library.)
In the FreeFileSync window, specify the two directories to be synchronised at the top. In our example (see screenshot point 1):
/media/drive/Max Mustermann
and (point 2):
/home/xxx/drive-local
Use the green cog icon at the top right (point 3) to configure the synchronisation details. Click on the green arrow icon (point 4) to start synchronisation. The next step shows you the pending tasks. If these seem plausible, you can confirm the synchronisation.
Automatic synchronisation with RealTimeSync
When you install FreeFileSync, the separate programme RealTimeSync is also installed. RealTimeSync can perform synchronisation automatically in the background. It monitors both directories and starts synchronisation as soon as it detects a change.
To set up RealTimeSync, you need a batch file containing the synchronisation tasks. You can create this by selecting ‘File – Save as batch job’ in FreeFileSync. Keep the default settings.

Figure 3: Automatic synchronisation with RealTimeSync.
By default, the name of the batch file is ‘BatchRun.ffs_batch’ and should be saved in this example under ‘/home/xxx/Programs/FreeFileSync’.
Now start the RealTimeSync programme. It can be started via the executable file:
/home/xxx/Programs/FreeFileSync/RealTimeSync
In RealTimeSync, specify the two directories to be synchronised again (points 1 and 2 in the screenshot). For the command line to be executed (point 3 in the screenshot), enter the following:
/home/xxx/Programs/FreeFileSync/FreeFileSync /home/xxx/Programs/FreeFileSync/BatchRun.ffs

Figure 4: Automatic synchronisation with RealTimeSync.
RealTimeSync indicates that it is active by displaying two red arrows in the taskbar. As soon as synchronisation begins, two green arrows appear, which disappear again once synchronisation is complete.
From now on, you can always save data in the local directory:
/home/xxx/drive-local/
RealTimeSync then synchronises with the mailbox Drive.
Note:: RealTimeSync limitations
With RealTimeSync, you can specify how long to wait after a change is detected before synchronisation starts (‘minimum idle time’). Directory monitoring is temporarily suspended during synchronisation. If file operations take place during this time, they are not detected immediately. However, these files will be synchronised during the next automatic or manual synchronisation.
Run FreeFileSync automatically at system start
Lubuntu (LXQt)
In Lubuntu, the automatic start of FreeFileSync can be set up via the LXQt session settings:
- Open the session settings (
lxqt-config-session). - Switch to Autostart.
- Add the following command:
/home/xxx/Programs/FreeFileSync/RealTimeSync" "/home/xxx/Programs/FreeFileSync/BatchRun.ffs

Figure 5: Automatic start of FreeFileSync.

Figure 6: Automatic start of FreeFileSync.
Done!
Now you can test it by copying files to the directory on your computer that you want to update. In our example: /home/xxx/drive-local/.
Check whether the added files then appear under /media/drive/.
Please note that synchronising very large files over a slow internet connection (especially when uploading) can slow down the system.
Enjoy using mailbox Drive on Linux!
