Skip to content

Cannot upload files using webdav extension. #3628

Closed

Description

@abpostelnicu

Hello,

I've installed recently nexcloud, and i'm trying to upload files using the webdav extension. But it fails with the message:
screen shot 2017-02-26 at 10 22 25
Although the upload fails it still creates the file on the webdav server but with a length of 0 bytes.

The server error log that i get is:

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.
/media/588c3a53-edd3-4f27-bcc1-7d2281ed8aec/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/media/588c3a53-edd3-4f27-bcc1-7d2281ed8aec/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 60: Sabre\DAV\Server->exec()
/media/588c3a53-edd3-4f27-bcc1-7d2281ed8aec/www/nextcloud/remote.php - line 165: require_once('/media/588c3a53...')
{main}

The configuration of my server is as follows:

OS: Debian 8
Web Server: Nginx 1.6.2
PHP-FPM: 5.6.30-0+deb8u1
MySQL: 5.6.35

Any advise is well appreciated.

Activity

  1. Domoel commented on Feb 28, 2017

    @Domoel

    I have the same problem.

  2. nickvergessen commented on Mar 7, 2017

    @nickvergessen
    Member

    Can you please have a look at the access log of your server with the same timestamp and check what page was requested with which user agent?
    Like in #2887 (comment)

  3. abpostelnicu commented on Mar 8, 2017

    @abpostelnicu
    Author

    Here are the logs, for example i'm trying to copy and paste Test2.cpp, the output is:

    "PROPFIND /remote.php/webdav/.Test2.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/.
    . HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/Test2.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 5692 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._.DS_Store HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Home%20Assistant HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Apps HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Documents HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Downloads HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Home%20Clips HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Movies HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Music HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Photos HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Projects HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/.TV%20Shows HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 5692 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/Test2.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PUT /remote.php/webdav/Test2.cpp HTTP/1.1" 201 0 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/.Test2.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "LOCK /remote.php/webdav/Test2.cpp HTTP/1.1" 500 315 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/.
    . HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/Test2.cpp HTTP/1.1" 207 624 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/Test2.cpp HTTP/1.1" 207 624 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 6132 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/.
    .DS_Store HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Home%20Assistant HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Test2.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Apps HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Documents HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Downloads HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Home%20Clips HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Movies HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Music HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Photos HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._Projects HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/._TV%20Shows HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"

    No logs are present in the nginx error log

  4. abpostelnicu commented on Mar 13, 2017

    @abpostelnicu
    Author

    Unfortunately the result is the same:

    "PROPFIND /remote.php/webdav/Apps/clang-format-test.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/Apps/clang-format-test.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PUT /remote.php/webdav/Apps/clang-format-test.cpp HTTP/1.1" 201 0 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "PROPFIND /remote.php/webdav/Apps/._clang-format-test.cpp HTTP/1.1" 404 11562 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"
    "LOCK /remote.php/webdav/Apps/clang-format-test.cpp HTTP/1.1" 500 315 "-" "WebDAVFS/3.0.0 (03008000) Darwin/16.4.0 (x86_64)"

    A 0 byte file is created.

  5. vivorbv commented on Mar 15, 2017

    @vivorbv

    Exactly the same here. Tested with Apache 2.4 + PHP 7.0 and nginx + PHP 7.0 and nginx + PHP 7.1. After applying the patch from #3757 I don't get the "can't be read or written" error anymore, but file uploads result in extremely long waiting times (+60s for a 10KB file) and eventually fail (after the 60s+ wait a 0KB file is created).

  6. DanClarke-io commented on Mar 16, 2017

    @DanClarke-io

    Just to add to this, I am getting the same issue as @vivorbv, does transfer, but takes over a minute to do 200kb.

  7. Yamakasi commented on Mar 22, 2017

    @Yamakasi

    I see the same issue at the moment, I hope we can this fixed as I finally have webdav mounted again :)

  8. JonathanSchndr commented on Mar 22, 2017

    @JonathanSchndr

    What is the status? @nickvergessen

  9. Yamakasi commented on Mar 22, 2017

    @Yamakasi

    I can mount WebDav using NET USE but can indeed not upload using it.

  10. paolomeraviglia commented on Apr 3, 2017

    @paolomeraviglia

    problem mounting webdav with OSX and windows only: What is the status? How can I solve this?

  11. vivorbv commented on Apr 11, 2017

    @vivorbv

    Is there any news on this? It's been almost a month and this issue heavily affects what we regard as the core of nextcloud's functionality (file storage). Is it possible to give this issue a higher priority?

  12. paolomeraviglia commented on Apr 28, 2017

    @paolomeraviglia

    news about this problem?

  13. LLynx commented on May 4, 2017

    @LLynx

    After updating to „Nextcloud 11.0.3 (stable)“ there were no error messages anymore (Goodbye to „Error code -36“). Nevertheless I still can't upload any files via OSX Finder to a mounted „nextCloud“ folder ;-( Just mentioned not to forget this ... well ... not insignificant little slutty bug.

  14. 22 remaining items

  15. jamierocks commented on Jul 11, 2018

    @jamierocks

    I have the same issue running 13.0.4. :(

  16. removed
    stale
    on Jul 11, 2018
  17. LLynx commented on Jul 23, 2018

    @LLynx

    Careful reason for bright joy: I think they finally made it!

    I just had 13.0.5. installed and – it worked: Since the beginnings of the old "owncloud" versions I was just able to conjure a file directly from the macOS Finder into the Nextcloud for the first time!

    Simply drag and drop from a (local) folder to a (remote) folder!

    21st Century: We are coming! ;-)

    THX guys!

    macOS High Sierra
    Version 10.13.6

  18. jamierocks commented on Jul 23, 2018

    @jamierocks

    I'll update and give it a go, hoping it works :D

  19. LLynx commented on Jul 23, 2018

    @LLynx

    Bad news. I was too euphoric. They did NOT make it ;-( ... only continue that zero byte file thing.

    A small consolation: What I can faithfully reproduce is this:

    When I look at a local file in a browser (file: //), I can drag and drop the file from the browser window to a (remote) folder. Then the file arrives in Nextcloud.

    Strange, but go. Is this that "locking thing"?

  20. steffen-moser commented on Aug 31, 2018

    @steffen-moser

    I run into the same problem with Apple's Finder (macOS High Sierra 10.13.6) as a WebDav client and the following Nextcloud installation:

    Nextcloud: 13.0.5
    Server OS: Oracle Solaris 11.3 SRU 34 (11.3.34.4.0)
    Web Server: Apache 2.4.33
    PHP-FPM: 7.1.17
    MySQL: 5.7.17

    The problem only occurs when using PHP-FPM. When switching back to "mod_php7", it is gone. I'm am very sure that the problem is documented here in the section "Chunked encoding". There is also an Apache bug which seems to be related to this one. For this moment, the only work-around, which seems to help, is to use mod_php instead of FPM...

  21. added
    0. Needs triage
    on Jun 12, 2019
  22. magnetic5355 commented on Jul 8, 2020

    @magnetic5355

    Having this issue - running a file:scan corrects the files however this is causing our organizations rollout of Next to fail since all of our mount drives report 0KB files until rescanned. Also modifying files in the GUI / openoffice does not update the file meta data causing files not to open via webdav until file:scan is rerun.

  23. okoeroo commented on Jul 8, 2020

    @okoeroo

    This is the most silly bug ever. It's ultimately a problem in an underlying library implementing DAV and how it handles the locking mechanism. But both Owncloud and Nextcloud don't seem to be interested to apply sufficient support for over 3 years. If you intend to use Nextcloud from Finder mounts I would not consider this product for it. What could be done, assuming deployment fits other criteria on how you deal with the accounts, is to integrate a normal Samba tool that looks at the same user database, for example LDAP and have Nextcloud to look at that LDAP too. This bypasses this issue as you skip the WebDAV option and shift to CIFS/SMB on the same storage block.

  24. added
    1. to develop
    and removed
    0. Needs triage
    on Aug 20, 2020
  25. deadmanIsARabbit commented on Dec 22, 2020

    @deadmanIsARabbit

    I ran into this issue as well.
    Turns out nginx + php-fpm over a socket file is the main cause of this issue.
    After switching from socket to an IP connection everything works as expected.
    Props and thanks goes to @Temesta:
    https://central.owncloud.org/t/nginx-connection-refused-for-webdav-requests-from-osx-client-app/17432/7

    Can anybody confirm workaround as a solution for Apache aswell?

  26. skjnldsv commented on Feb 19, 2021

    @skjnldsv
    Member

    Well done @deadmanIsARabbit
    Yeah, we're all relying on a very popular dav backend implementation.
    It all works fine on the recommended setups we test against (see docs)

    Closing then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developbugfeature: dav

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions