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.

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?

1 Answer 1


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):

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).

  • Thank you. I don't have a computer I can test on right now but I will check it as soon as I do. Sep 19, 2017 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.