Logo
IT Dienstleistungen

1&1 Smartdrive, GMX Mediacenter and Linux

Customers of 1&1 Internet is offered a ~15 GB webdrive for private storage of mediafiles and documents, also with the option to share selected folders with others. The same offer is available for GMX-Mail customer with the freemail option, only a lower size (~1 GB) for mail and storage.

While access via web-interface works flawlessly in linux, I tried to find a better solution integrating the web-drive into my linux system as a backup or file share.

Around the web I found some tutorials, but they did not work out-of-the-box due to older release versions either from the tools or linux distribution.

Getting startet

As all United Internet Webdrives (GMX, WEB.de, 1&1) depends on secure webdavs connections, you need to build the davfs (DAV Filesystem) from source (at the time I wrote this).

Grab the newest source-package from http://dav.sourceforge.net/ and untar it with

tar -xzvf davfs2-X.X.X.tar.gz 

You also need the following packages (hint: other distributions than openSUSE may have different names for devel packages)

neon libneon27 libneon-devel openssl libopenssl-devel

switch to the new generated folder davfs

cd davfs2-X.X.X/ 

and run the configure tool with support for SSL

./configure --with-ssl

If everything worked, you can run afterwards

make
make install

The second command must be done as root or with sudo.

Now, within openSUSE /usr/local/sbin is not in the path-variable, so we create a link for better access:

ln -s /usr/local/sbin/mount.davfs /bin/mount.davfs

Also a new directory as mount destination is needed, I choose

mkdir /media/smartdrive

My davfs install asked for the group and user davfs2, so we create both:

groupadd davfs2
useradd davfs2

Now you can mount the web drive (as root) with:

mount.davfs https://sd2dav.1und1.de /media/smartdrive/ -o gid=users,nolocks=1

As pointed out by Matthew the webdav url changed (or an additional?) (we have 2013 now) to https://webdav.office.1and1.com/ . The command could look like this now:

mount.davfs https://webdav.office.1and1.com/  /media/smartdrive/ -o gid=users,nolocks=1

It will ask you for your username + password on the command line, but we can automate this …

For the GMX Drive, it is easy to do the same, just create another mount folder

mkdir /media/mediacenter

And mount it

mount.davfs https://mediacenter.gmx.net /media/mediacenter/ -o gid=users,nolocks=1

Now mounted, it is only possible for the root user to write to the webdrives. To avoid this uncool thing, we add some entries to /etc/fstab

/etc/fstab

https://mediacenter.gmx.net/ /media/mediacenter/ davfs user,noauto 0 0
https://sd2dav.1und1.de/ /media/smartdrive davfs user,noauto 0 0
#https://webdav.office.1and1.com/ /media/smartdrive davfs user,noauto 0 0

This will NOT mount the drives on boot, but now every user within the group davfs2 can mount it and have read/write access.

To add your user to this group call as root

usermod -G davfs2 <USERNAME>

Now users can mount the drives with

mount /media/mediacenter

or

mount /media/smartdrive

The last part is optional, but it avoids the re-entering of username and password everytime. We have to create a new file in ~home.

~/.davfs2/secrets

https://mediacenter.gmx.net   mailaddress@gmx.de   yourpassword
https://sd2dav.1und1.de/      mailaddress@1und1.de yourpassword

It is needed to keep this file only viewable for yourself chmod 600 ~/.davfs2/secrets

Remember: Copying into and from this folder depends on your internet speed

Seiten-Werkzeuge