6

I was able to install davfs2 and I can even mount the SharePoint document library using it but when I try to do anything on the mount I get an error.

I can mount the document library:

root@host:/# mount -t davfs "http://sharepoint/Shared Documents" /mnt/sp
Please enter the username to authenticate with server
http://sp/Site Stuff or hit enter for none.
  Username: username
Please enter the password to authenticate user nacho with server
http://sp/Site Stuff or hit enter for none.
  Password:  

I can CD to it and I can see it mounted since there:

root@host:/# cd /mnt/sp
root@host:/mnt/sp# ls
Forms  lost+found  home.html

But when I try to create a file or do anything I get an error:

root@host:/mnt/sp# touch a
touch: setting times of ‘a’: No such file or directory

root@host:/mnt/sp# date > hi.txt
bash: hi.txt: Invalid argument

Anyone have any ideas what's wrong?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
IMTheNachoMan
  • 355
  • 1
  • 6
  • 17

1 Answers1

7

I met this problem today, and as the fix I applied works fine, here it is.

It looks like the WebDAV default option use_locks is set to value 1 in the DAVFS configuration file davfs2.conf.

Here is an excerpt of the manual of this file (provided by the command man davfs.conf):

 use_locks
Whether to lock files on the server when they are opened for writing.  0 = no, 1 = yes.
Default: 1

I would recommend changing the use_locks value to 0 by adding the line

use_locks 0

either in the system wide DAVFS configuration file (usually: /etc/davfs2/davfs2.conf) or in the user customized file (usually: ~/.davfs2/davfs2.conf).

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
sitiga
  • 86
  • 1
  • 4