Suddenly I can not upload files on Windows10(WebDAV)

Until last Friday I was able to upload on Windows10(Network drive) without problems, but suddenly we could not just upload from this morning. We can download it without problems. It happens on all Windows machines owned by us.

Error: Can’t read from the source file or disk.

For example, even a text file (5KB) can not be uploaded. I think that it is not a matter of file size.
I am not using file names nor special characters. I can not upload it even by “abc.txt”.

I restarted the server, restart nginx. And change nginx.conf to simple contents. Adjust items such as memory_limit and upload_filesize. Change permission of NC files. I did these, but I did not improve anything.

I disabled the application “External storage support” from Nextcloud settings.
Then I got server error 500. I removed the External storage support directory from the app directory but could not recover. So I changed the app directory from the NC source to the new app default state. This resolved the 500 error. But I can not upload files even in this state.

If the file on the NC drive and the local file name is the same, uploading is possible. (Overwrite processing.) I can not upload another name files and new files.
However, it seems that it is not possible to open the file from the mounted NC drive and save it by the application.

There are different builds of Windows 10 owned by us. It is the same in all Windows including them. We never operated and accessed Nextcloud on this Saturday and Sunday.
I think that it is a problem on the NC side, please tell me how to solve this problem.

[webdav] Fatal: Sabre\DAV\Exception: Error while copying file to target location (copied bytes: 0, expected filesize: 0 ) at <<closure>>

0. /MY-NEXTCLOUD/apps/dav/lib/Connector/Sabre/Directory.php line 156
   put(null)
1. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   createFile("abc.txt", null)
2. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
   createFile("abc.txt", null, null)
3. <<closure>>
   httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /MY-NEXTCLOUD/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /MY-NEXTCLOUD/apps/dav/appinfo/v1/webdav.php line 80
   exec()
8. /MY-NEXTCLOUD/remote.php line 163
   require_once("/MY-NEXTC ... p")

PUT /remote.php/webdav/abc.txt
from XXX.XXX.XXX.XXX by NC-USER at 2018-12-17T10:38:12+09:00

[no app in context] Error: Sabre\DAV\Exception: Error while copying file to target location (copied bytes: 0, expected filesize: 0 ) at <<closure>>

0. /MY-NEXTCLOUD/apps/dav/lib/Connector/Sabre/Directory.php line 156
   put(null)
1. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   createFile("abc.txt", null)
2. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
   createFile("abc.txt", null, null)
3. <<closure>>
   httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /MY-NEXTCLOUD/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /MY-NEXTCLOUD/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /MY-NEXTCLOUD/apps/dav/appinfo/v1/webdav.php line 80
   exec()
8. /MY-NEXTCLOUD/remote.php line 163
   require_once("/MY-NEXTC ... p")

PUT /remote.php/webdav/abc.txt
from XXX.XXX.XXX.XXX by NC-USER at 2018-12-17T10:38:12+09:00

[PHP] Error: feof(): supplied resource is not a valid stream resource at /MY-NEXTCLOUD/apps/dav/lib/Connector/Sabre/File.php#172

PUT /remote.php/webdav/abc.txt
from XXX.XXX.XXX.XXX by NC-USER at 2018-12-17T10:38:12+09:00

Nextcloud 15.0.0 / CentOS 7.5 / PHP 7.1.24 / nginx 1.13.8

Hi,
Have you checked the logging from admin?
Please share.

I am trying to upload a LibreOffice document file named HP.odt. At this time, nothing is left in the error log.

XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:00:06 +0900] "PROPFIND /remote.php/webdav HTTP/2.0" 207 597 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:00:09 +0900] "PROPFIND /remote.php/webdav/desktop.ini HTTP/2.0" 404 239 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:00:18 +0900] "PROPFIND /remote.php/webdav HTTP/2.0" 207 30530 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:16 +0900] "PROPFIND /remote.php/webdav HTTP/2.0" 207 597 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:29 +0900] "PROPFIND /remote.php/webdav/Apps/desktop.ini HTTP/2.0" 404 244 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:30 +0900] "PROPFIND /remote.php/webdav/Big%20Data%20035/desktop.ini HTTP/2.0" 404 252 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:32 +0900] "PROPFIND /remote.php/webdav/HP.zip HTTP/2.0" 404 234 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:32 +0900] "PROPFIND /remote.php/webdav/HP.7z HTTP/2.0" 404 233 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:32 +0900] "PROPFIND /remote.php/webdav/HP.odt.gz HTTP/2.0" 404 237 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:33 +0900] "PROPFIND /remote.php/webdav HTTP/2.0" 207 30530 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:33 +0900] "PROPFIND /remote.php/webdav/HP.odt HTTP/2.0" 404 234 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:34 +0900] "PUT /remote.php/webdav/HP.odt HTTP/2.0" 500 267 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:34 +0900] "PROPFIND /remote.php/webdav/HP.odt HTTP/2.0" 404 234 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:34 +0900] "PUT /remote.php/webdav/HP.odt HTTP/2.0" 500 267 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:34 +0900] "PROPFIND /remote.php/webdav/HP.odt HTTP/2.0" 404 234 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"
XXX.XXX.XXX.XXX - NC-USER [17/Dec/2018:16:01:34 +0900] "PUT /remote.php/webdav/HP.odt HTTP/2.0" 500 267 "-" "Microsoft-WebDAV-MiniRedir/10.0.17763"

I’m curious, what happens when you try to upload the file from the portal?

Will “Portal” operate Nextcloud with Web browser?
I can upload without problems if there is from there.

I’ve done a quick search on “LibreOffice cannot upload via webdav” and found many people are reporting the same issue, honestly I am not sure why and how to fix it. Lets hope someone will come along who knows the fix.

However, try to use the NC app, if using the browser its working, then it should work with the app. https://nextcloud.com/install/#install-clients
Question, why dont you use onlyoffice? I am using it on my server and its working beautifully.

Libreoffice is an example only. I will create the data on the local PC. It does not matter about text, pictures, movies, or any kind. I upload it to the NC drive that I mounted with WebDAV. An error will result.
I can open the data on the NC drive with the appropriate application, but I can not save it.

hmmm, you are absolutly right, I just did a test and got this error message.
I’m researching right now.

image

I tried uploading NC drive on Mac with Finder. A similar error occurred on Mac. Error -36. The error log of NC is exactly the same as the error in Windows. I seem to be able to upload using the WebDAV client application(etc. Cyberduck) instead of the Finder.

I found a solution. Apparently these apps(Antivirus for files, Default encrypt module) seem to be related. If even one of these two applications is “ENABLE”, we seem to be unable to upload with WebDAV.

For example, in case of Antivirrus for files, is it NC’s application problem? Or is it a problem with ClamAV installed on the server? Of course, no problems occurred when scanning with ClamAV alone on the server.
The Default encrypt module no longer understands at all.

But I can not understand. In that situation there was no problem in the same environment last week. Is there any time involved?

Hmmm, that is interesting find!
Lets test :smiley:

Oh wow!!! U got it!!!
I just disabled the Antivirus module, and it worked, turned it back on, and the message popped up again.
So its something to do with the security, I’ll need to dig more…

I’ve changed the settings to Executable, and tried again, twice, but with the same results.
Even tried clearing all the rules, but with no luck.
The odd thing is, I see a spike in the CPU and MEM when I try to save a file, which is understandable as ClamAV is starting.
Thus, the file is reaching the server i guess, but its getting bounced back.

I think this is a bug?

A post was split to a new topic: Can’t upload files >1 MB

Also think about checking your disks on the server, perhaps one disk is already full or has a broken filesystem. This can turn up suddenly.

Other thing to check: Use a different webdav client, the Microsoft implementation is known to be buggy, and Windows updates, moon cycle or whatever could change its behavior.

Confirmed. RAID 5 SSD array with 5TB free for my 1.1MB upload. :rofl:

I encountered this problem when I ran freshclam for the first time after updating to NC15. ClamAV via epel has been released for updates, so I updated ClamAV to ver.0.101.0. However, this problem does not seem to be solved.

Are we still thinking this is caused by ClamAV or are there other options to investigate?

I’m having the same issue with NC 15, everything works, exepct the file upload through WebDAV in Windows.
Getting the error “cannot read file from the source file or disk”

I already disabled the default encryption module, but nothing changed