Owncloud Webdav cp: cannot create regular file `/mnt/shared/documents/file.txt’: Invalid argument

trying to cp a file to a webdav mounted owncloud share from my linux machine failed wth the following error

cp: cannot create regular file `/mnt/shared/documents/file.txt': Invalid argument

However I was still able to copy from owncloud to my box. checking /var/www/owncloud/data/owncloud.log showed

{"app":"webdav","message":"Sabre\DAV\Exception\BadRequest: expected filesize 162 got 0","level":4,"time":"2015-04-24T13:15:31+00:00"}

To fix this issue open /etc/davfs2/davfs2.conf and change

# use_locks 1
to
use_locks 0

unmount and remount your share and you should be be able to copy with no errors.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *