Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunked upload not working (Files larger than 10MB) #8802

Closed
grahamsk opened this issue Mar 13, 2018 · 27 comments
Closed

Chunked upload not working (Files larger than 10MB) #8802

grahamsk opened this issue Mar 13, 2018 · 27 comments

Comments

@grahamsk
Copy link

Hi,

I am having trouble with chunked uploads in nextcloud 13. It doesn't seem to work from web ui & sync client.
When trying to upload I get the error message that .file doesn't exist. (See below)

If I change the sync client chunkSize setting on my mac os client then I am able to upload files by effectively disabling chunking when setting chunk size to something larger than the file to be uploaded.

Also, webdav using native OSX Sierra works correctly, the issue is with web ui upload and nextcloud client uploads larger than 10MB.

I also upgraded nextcloud to version 13 from 12 a few weeks ago using the webui.

I should also not that my php settings are correct and in line with https://docs.nextcloud.com/server/13/admin_manual/configuration_files/big_file_upload_configuration.html. I have confirmed this using a phpinfo page on the installation.

Could someone please help me to try and troubleshoot this?

Relevant details:

Nextcloud version (eg, 12.0.2): 13.0.0.14
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.18
PHP version (eg, 7.1): 7.0.25

The issue you are facing:

Chunked uploading fails with the following error message:

file-upload.js:274 MOVE https://{url}/remote.php/dav/uploads/{user}/web-file-upload-41fb9a29f46486d4f8d24f9ff0318bab-1520776283884/.file 404 (Not Found)

I've confirmed that if I configure the client (OSX Sierra) with larger chunkSettings than the file to upload then uploads work correctly.

Is this the first time you've seen this error? (Y/N): Y

Steps to replicate it:

  1. Upload file larger than 10Mb
  2. Check log or developer tools in browser for error message

The output of your Nextcloud log in Admin > Logging:

rewinddir(): 76 is not a valid Directory resource at /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#31

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'debug' => 'true',
  'instanceid' => {instanceid}
  'passwordsalt' => {salt}
  'secret' => {secret}
  'trusted_domains' =>
  array (
    0 => {domain}
  ),
  'datadirectory' => '/mnt/datadirectory',
  'overwrite.cli.url' => {overwriteurl}
  'dbtype' => 'mysql',
  'version' => '13.0.0.14',
  'dbname' => {dbname}
  'dbhost' => {dbhost}
  'dbport' => '', 
  'dbtableprefix' => {prefix}
  'dbuser' => {user}
  'dbpassword' => {password}
  'logtimezone' => 'UTC',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE
@pvanthony
Copy link

pvanthony commented May 5, 2018

I am having the same issue.
Nextcloud version 13.0.2
Nginx
php 7.0
Used firefox and chrome.
My desktop client is on Fedora 27

@pvanthony
Copy link

The following work around seems to be working. I hope an official fix will come soon.
https://help.nextcloud.com/t/nextcloud-13-chunking-upload-not-working/28755/17

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot

This comment has been minimized.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 5, 2018
@MorrisJobke MorrisJobke reopened this Jul 5, 2018
@AndrewErman

This comment was marked as duplicate.

@SvenRath

This comment was marked as duplicate.

@Olli

This comment was marked as duplicate.

@fizux
Copy link

fizux commented Jul 31, 2018

Ditto. Using the docker image.

@AndrewErman

This comment was marked as duplicate.

@AndrewErman AndrewErman mentioned this issue Aug 2, 2018
58 tasks
@SvenRath SvenRath mentioned this issue Aug 15, 2018
45 tasks
@jospoortvliet
Copy link
Member

@icewind1991 happens in your lib so I suppose it's one for you?

@Sapphireb1ue

This comment has been minimized.

@andreaspollak

This comment has been minimized.

@alo-is

This comment has been minimized.

@mleu77

This comment has been minimized.

@alo-is
Copy link

alo-is commented Oct 4, 2018

Just found the root cause of my issue, which was related to the Nginx configuration, and not Nextcloud : debops/ansible-owncloud#87 and debops/debops#469.

@timm2k
Copy link
Contributor

timm2k commented Oct 5, 2018

Hm, this clause isn't in the recommended example config for running Nextcloud with nginx. But it makes absolutely sense to the initiating issue.

https://docs.nextcloud.com/server/13/admin_manual/installation/nginx.html
https://docs.nextcloud.com/server/14/admin_manual/installation/nginx.html

@andreaspollak
Copy link

andreaspollak commented Oct 20, 2018

my problem is gone, since changes in vhost config (using ispconfig 3.1 standard template for nginx)

from this (vhost config)
location ~ /\. { deny all; }

lines from access.log:
xx.xx.xx.xx - USERNAME [19/Oct/2018:16:50:47 +0200] "MKCOL /remote.php/dav/uploads/USERNAME/3784624209 HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)" xx.xx.xx.xx - USERNAME [19/Oct/2018:16:50:51 +0200] "PUT /remote.php/dav/uploads/USERNAME/3784624209/00000000 HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)" xx.xx.xx.xx - USERNAME [19/Oct/2018:16:50:54 +0200] "PUT /remote.php/dav/uploads/USERNAME/3784624209/00000001 HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)" xx.xx.xx.xx - USERNAME [19/Oct/2018:16:50:57 +0200] "PUT /remote.php/dav/uploads/USERNAME/3784624209/00000002 HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)" xx.xx.xx.xx - USERNAME [19/Oct/2018:16:50:57 +0200] "MOVE /remote.php/dav/uploads/USERNAME/3784624209/.file HTTP/1.1" 500 186 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"

to this (vhost config)
location ~ /\.(?!file).* { deny all; }

upload with desktop client is working fine now!

@MorrisJobke
Copy link
Member

my problem is gone, since changes

Where are those statements coming from?

@MisterCrabman

This comment was marked as duplicate.

@jospoortvliet
Copy link
Member

@blauark pls don't just add a me-too, unless you have any info that can help us track down the problem - right now we simply can't reproduce it, things work fine on our test setup so this isn't a valid, useful issue until it can be reliably reproduced. It seems all due to bad configuration on the server, eg NGINX settings and so on. I actually think we should close this as a 'not a Nextcloud issue' unless someone has proof to the contrary. This isn't a support forum for web server configuration issues...

@MorrisJobke
Copy link
Member

Closing as @jospoortvliet said.

@Zocker1999NET
Copy link

@jospoortvliet You are right that this is not an issue of Nextcloud but I would propose to add this to the installation manual cause it is recommended to block dot files when using nginx on root directories with .git or similar directories. I got the same error today and it required too much time for me to find this article so just a little hint in the manual would have saved a few hours of mine and it could save hours and frustration of others in the future.

@karl-in-office
Copy link

@Zocker1999NET
I agree with you.

@jospoortvliet @MorrisJobke
I would appreciate If the installation manual clearly state that front-end server should allow accesses to ".file".
(example NGINX and Apache configuration also)

@jospoortvliet
Copy link
Member

@Zocker1999NET @karl-in-office that does make sense. Any chance I can persuade one of you to propose such a note about this in the docs? If you go to the docs about nginx there is a neat edit on github button that should make it easy to propose an improvement ;-)

@karl-in-office
Copy link

@jospoortvliet
I would like to contribute the docs to Nextcloud, but it'll be difficult for me to do forking and PR due to company regulations :-(
I apologize for that.

I'll leave related issues which might be the same root cause for future reference.
Related issues that I found are: #7999, #17005
Related PR is: /pull/1283

@jospoortvliet
Copy link
Member

Many thanks to @Zocker1999NET for the PR ;-)

@BeWog
Copy link

BeWog commented May 1, 2020

  • For information, I had this message in Nginx error log:

2020/05/01 10:50:09 [error] 8676#8676: *2 access forbidden by rule, client: 192.168.1.254, server: nextcloud.mydomain, request: "MOVE /remote.php/dav/uploads/myuser/2254808276/.file HTTP/1.1", host: "nextcloud.mydomain"

  • And in Nextcloud application for Windows:

2020-05-01 08_13_20-Nextcloud
Server replied 403 Forbidden to MOVE ...

The problem came from this tool : https://www.digitalocean.com/community/tools/nginx
/etc/nginx/nginxconfig.io/security.conf was the problem.

Fixed with

location ~ /\.(?!well-known)(?!file) {
        deny all;
}

@Aguay-val
Copy link

  • For information, I had this message in Nginx error log:

2020/05/01 10:50:09 [error] 8676#8676: *2 access forbidden by rule, client: 192.168.1.254, server: nextcloud.mydomain, request: "MOVE /remote.php/dav/uploads/myuser/2254808276/.file HTTP/1.1", host: "nextcloud.mydomain"

  • And in Nextcloud application for Windows:

2020-05-01 08_13_20-Nextcloud
Server replied 403 Forbidden to MOVE ...

The problem came from this tool : https://www.digitalocean.com/community/tools/nginx
/etc/nginx/nginxconfig.io/security.conf was the problem.

Fixed with

location ~ /\.(?!well-known)(?!file) {
        deny all;
}

Solved my problem.
Thank you 👍 !

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

No branches or pull requests