It is indeed possible, but I don't have a smooth solution yet. I'm mounting SharePoint Drives with davfs2. For this to work you have to authenticate with a browser (by simply accessing your SharePoint site). You then have to extract the Cookies named "rtFa" and "FedAuth". They have to be pasted at the end of the file /etc/davfs2/davfs2.conf like so:
add_header Cookie rtFa=<your cookie here>;FedAuth=<your other cookie here>;
Also add the following line:
use_locks 0
To mount the share, I use the URL of the SharePoint-Webinterface-URL of the Share, without the default.aspx at the end. I also entered them into /etc/fstab, so I can easily mount them:
https://myinstitution.sharepoint.com/sites/path/to/my/share/ /path/to/my/mountpoint davfs user,rw,noauto 0 0
To get the cookies to the davfs2.conf file, I use Chrome with the cookies.txt Extension, so I can save them to a file cookies.txt with two clicks. Then I wrote a small Ruby-Script which parses this file and adds the line to the davfs2.conf file. I currently have a sympolic link from /etc/davfs2/davfs2.conf to a file on my home directory, but the cleaner way of doing it would be a config file per user (which davfs2 allows afaik). It's far from ideal, but it does the job for now.
#!/usr/bin/ruby
davfsFile = "/path/to/the/file/davfs2.conf" # Replace this
cookiesFile = "/path/to/the/file/cookies.txt" # Replace this
cookies = File.read(cookiesFile).split("\n").map{|c| c.split("\t")}
`rm #{cookiesFile}`
cookies.select!{|c| c[5]=="rtFa" || c[5]=="FedAuth"}
cookieline = "add_header Cookie #{cookies[0][5]}=#{cookies[0][6]};#{cookies[1][5]}=#{cookies[1][6]};"
davfsconf = File.read(davfsFile).split("\n")
davfsconf[-1]=cookieline
File.write(davfsFile, davfsconf.join("\n"))
File transfer is fast and usable, directory access is almost unusably slow, something like
ls */bla
takes 40 s in a directory with 30 entries... I'm investigating the cause and I will post here when I know more...
Did you ever find a solution? I have a similar problem. – Nate Eldredge – 2015-12-10T18:57:31.360
Unfortunately no (though I haven't checked recently to see if MS changed anything). We also have BOX.COM which does support WebDav and have mostly switched to that...thereby wasting all our SharePoint storage. :( – proximous – 2015-12-11T01:30:52.687