User Mounting Owncloud Contextualization
The goal of this page is to explain a method to ease file transfers between your laptop and a VM.
ULB and VUB users can obtain an ownCloud storage space by connecting to https://owncloud.ulb.ac.be and authenticating with their NetID. By mounting your ownCloud folder on a VM, you can ease data transfers between your personal laptop and the VM : every file that you create in your ownCloud folder on your laptop will almost instantly be available on all machines where you have mounted your ownCloud folder.
Since ownCloud storage space is exported using WEBDAV protocol, the method described on this page can be adapted to any similar cloud storage technology offering a WEBDAV interface, like for example B2DROP. You just have to change the URL of the WEBDAV interface.
Procedure to mount the ownCloud folder
Adapt and run this script as root on the VM (in most cases, the only thing to adapt will the login that is 'cloudadm' in this example) :
#!/bin/bash echo "nameserver 126.96.36.199" >> /etc/resolv.conf yum -y install davfs2 USERC=cloudadm usermod -aG davfs2 $USERC mkdir /home/$USERC/owncloud mkdir /home/$USERC/.davfs2 chown $USERC:$USERC /home/$USERC/owncloud chown $USERC:$USERC /home/$USERC/.davfs2 cp -n /etc/davfs2/secrets /home/$USERC/.davfs2/secrets chown $USERC:$USERC /home/$USERC/.davfs2/secrets chmod 600 /home/$USERC/.davfs2/secrets echo "https://owncloud.vub.ac.be/remote.php/webdav USERNAME PASSWORD" >> /home/$USERC/.davfs2/secrets echo "https://owncloud.vub.ac.be/remote.php/webdav /home/$USERC/owncloud davfs users,rw,auto 0 0" >> /etc/fstab
If you don't have root access on the VM, you can copy/paste this code in the contextualization section during the VM creation process.
After that, you need to replace the token USERNAME and PASSWORD in the last line of your ~/.davfs2/secrets by their real values (your ownCloud username and password, that should be your ULB-VUB NetID and the corresponding password), and mount ownCloud by issuing this command :
If you want to unmount, simply do :