NC 11 with PHP 7 - Unable to copy files from local disk to mounted webdav drive (Sabre\DAV\Exception)

Hi everyone!

I have the following issue with NextCloud 11:

  • I mount a webdav drive in Window 10 - this works fine (using LDAP/AD credentials).
  • I can see the default NextCloud files.
  • Then I try to copy a file from my local drive to the webdav drive and immediately Windows Explorer complains that there is already a file with the same name, giving me 3 choices: replace, skip or compare info. If I choose “replace”, it fails again with the message “can’t read from the source file or disk”.
  • I checked my user folder directly on the NC server file system, and I see that, indeed, a file with that name is there, with the size of zero bytes. If I refresh the Windows Explorer window, I can also see the file there.
  • If I remove the zero byte file and I start over, the result is the same.
  • Copying files from the webdav drive to the local drive works just fine.
  • I see the following entry in nextcloud.log:

{"reqId":"WFWUMyy@LWbE8@2pBgI-mAAAAAY","remoteAddr":"86.120.145.8","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 500 No subsystem set a valid HTTP status code. Something must have interrupted the request without providing further detail.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#2 \\\/var\\\/www\\\/html\\\/nextcloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/html\\\/n...')\\n#3 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php\",\"Line\":495,\"User\":\"D95037C9-9A80-4A6C-8DC7-F775BCD93E24\"}","level":4,"time":"2016-12-17T19:38:27+00:00","method":"LOCK","url":"\/remote.php\/webdav\/Documents\/openvpn-connect.msi","user":"D95037C9-9A80-4A6C-8DC7-F775BCD93E24","version":"11.0.0.10"}

I double-checked the permissions for the nextcloud folders/files. Everything belongs to the apache user. I also ran “occ files:scan --all” and “occ maintenance:repair” with no luck. I disabled all memory caching (both APCu and Redis) but nothing changed.

I have other NextCloud 10 servers with virtually the same config and they work just fine, so this leads me to suspect that this is specific to NextCloud 11, but I could be wrong.

Any idea what else I could check? Even if it is a bug, I would prefer to find a workaround, rather then downgrading to 10.

Many thanks!

I just want to add that uploading files from the web interface works fine, so this is purely a webdav problem.

Versions used:

NextCloud 11.0.0
Apache 2.4.6
PHP 7.0.13

My sincere advise is, run, run away from v11 and downgrade to v10.0.2 with confident.
Looks like guys were in rush to announce v11 by sacrificing stability.
Now help portal is full with reported issues on v11 with no help at all!

I also have a problem with webdav access but i have it from OSX 10.12.2 to NC11.
Think we have the same error pattern…
Connect itself runs fine but copy files ends up immediately in error message in OSX and in NC11 logs:

OS X error message:

Der Finder konnte diesen Vorgang nicht abschließen, da einige Daten in „Osterreich-Asten-cloud.jpg“ nicht gelesen oder geschrieben werden konnten.
(Fehler: -36)

Nextcloud log error message:

Fatal webdav Sabre\DAV\Exception: HTTP/1.1 500 No subsystem set a valid HTTP status code. Something must have interrupted the request without providing further detail.
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 60: Sabre\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 165: require_once(’/var/www/nextcl…’)
{main}
2016-12-18T22:30:07+0100

Thanks, guys!

@vCentre, I did switch to 10.0.2 and it works fine now. I had no choice,since I need to have it running by tomorrow.

@nitroese, it looks like we are indeed hitting the same thing, so it does not seem to be client-OS specific.

Cheers!

I have the same problem. The point is that I can create/write folders and text files. But I can’t write any other type. But if I write that file as .txt and rename it, it works!

Does someone recognize this?

Edit:
I’ve switched to PHP 7.1 and it works now!
My config:
PHP
Version: 7.1.0, Memory Limit: 128.0 MB, Max Execution Time: 3600
Database
Type: mysql
Version: 10.1.19

Hey I want to revive this post. I encountered this same problem today, and it was also preventing me from writing to and modifying data on a connected Windows SMB share. I have the SMB share mounted to /mnt/samba via the /etc/fstab file on the server, and tell Nextcloud to access it as a local folder (sorry to say, the documentation on external storage with SMB is horrible to understand). I also encountered the same WebDAV problem you guys are talking about.

The solution was to get PHP 7.1 from an extra repo, but I don’t like that solution. Thankfully this is just a test machine and not the final product, so until this is fixed, if the company approves using Nextcloud, we will be using NC10, not 11.

The server as it stands right now:
OS: Ubuntu Server 16.04.2
Database: MariaDB 10, whichever one comes with Ubuntu 16.04
PHP: 7.1.0
Nextcloud version: 11.0.1

I can confirm that the patch for NC 11.0.2 described at


works for Windows 7 and Windows 10 clients connecting through WebDAV.
My current server setup:
OS: Debian 8 (jessie)
PHP: 5.6.30