OMEGA dataset on owncloud instance - webdav access?

OMEGA dataset is available from https://box.bic.mni.mcgill.ca/s/4qFZvf6tmgMA371 and I wondered (sorry - I am not much familiar with owncloud setups):

  • is there a way to avoid authentication (currently using publicly shared password) at all?
  • is there a way to access it via webdav interface of the owncloud?

Thank you in advance for clarifications!

At this time, we require users to register at this page in order to get the password to download the repository files. This is to help us stay in touch with users and to keep track of access to the files. It’s possible this could change in the future.

Sure. The details will depend on what you use as a WebDav client.
But the setup is the following:

webdav enndpoint: https://box.bic.mni.mcgill.ca/remote.php/webdav
username: omegaguest
password: the OMEGA password (see link above to register)

On ubuntu trusty, I have successfully mounted an owncloud folder with davfs2.
Here is one tutorial with steps for doing this: http://erikimh.com/creating-a-local-owncloud-mount-point-in-linux-using-webdav/

1 Like

There is a catch somewhere I guess :wink:

$> sudo mount /mnt/owncloud 
Please enter the username to authenticate with server
https://box.bic.mni.mcgill.ca/remote.php/webdav or hit enter for none.
   Username: 4qFZvf6tmgMA371
Please enter the password to authenticate user 4qFZvf6tmgMA371 with server
https://box.bic.mni.mcgill.ca/remote.php/webdav or hit enter for none.
  Password:  
/sbin/mount.davfs: mounting failed; the server does not support WebDAV

davfs2 1.5.4-3 from Debian sid, thanks for the pointer to the tutorial - followed it to the word :wink: (i.e. similar message even if I -s the davfs2 binary so it no longer asks for credentials). Here are some logs if anyhow help

Jul  6 13:05:34 hopa mount.davfs: davfs2 1.5.4
Jul  6 13:05:34 hopa mount.davfs: Initializing webdav
Jul  6 13:05:34 hopa mount.davfs: ah_create, for WWW-Authenticate
Jul  6 13:05:34 hopa mount.davfs: ah_post_send (#0), code is 200 (want 401), WWW-Authenticate is (none)
1 Like

Working on fixing this.
…
@yarikoptic I have made a change to the username given in above instructions.
Could you try to mount webdav again with that value changed?

Thanks! Different now indeed:

$> mount /mnt/owncloud
/sbin/mount.davfs: Mounting failed.
Could not authenticate to server: rejected Basic challenge

$> tail -f /var/log/syslog
Jul  7 09:58:58 hopa mount.davfs: auth: Trying Basic challenge...
Jul  7 09:58:58 hopa mount.davfs: auth: Accepted Basic challenge.
Jul  7 09:58:58 hopa mount.davfs: auth: Sending 'Basic' response.
Jul  7 09:58:59 hopa mount.davfs: ah_post_send (#1), code is 401 (want 401), WWW-Authenticate is Basic realm="ownCloud"
Jul  7 09:58:59 hopa mount.davfs: auth: Got challenge (code 401).
Jul  7 09:58:59 hopa mount.davfs: auth: Got 'Basic' challenge.
Jul  7 09:58:59 hopa mount.davfs: auth: Trying Basic challenge...
Jul  7 09:58:59 hopa mount.davfs: authentication failure:
Jul  7 09:58:59 hopa mount.davfs:   ownCloud
Jul  7 09:58:59 hopa mount.davfs: auth: No challenges accepted.

Edit 1: tried in a browser - it seemed to login fine, so not sure

I’ll review my setup, to check that it matches what you have.
Replace the following strings with your own values: myusername, /path/to/omega, the-omega-password

#Install the davfs2 WebDAV filesystem driver
sudo apt-get install davfs2

#Add yourself to the davfs2 group:
sudo usermod -aG davfs2 myusername

mkdir /path/to/omega
mkdir ~/.davfs2

#Copy /etc/davfs2/secrets to ~/.davfs2:
cp /etc/davfs2/secrets ~/.davfs2/secrets

#Set yourself as the owner and make the permissions read-write owner only:
chown myusername  ~/.davfs2/secrets
chmod 600 ~/.davfs2/secrets

#Edit secrets file, add following line at the end: ownCloud server, ownCloud username, password
https://box.bic.mni.mcgill.ca/remote.php/webdav omegaguest the-omega-password

#Edit /etc/fstab and add following line at the end:
https://box.bic.mni.mcgill.ca/remote.php/webdav /path/to/omega davfs user,rw,auto 0 0

#mount and authenticates by running the following command. 
sudo mount /path/to/omega

#Enter omega credentials when prompted by davfs

#To remove the davfs mount do
sudo umount /path/to/omega  

going via sudo with manually entering (well – pasting) the same omegaguest/password (since it is not under ~/.davfs2 for the root) worked! I only got the warning “/sbin/mount.davfs: warning: the server does not support locks” which I do not think relevant for me anyhow ATM. Thanks ! I will dance from there

1 Like