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

Files larger than 10mb fail to upload with Nextcloud app (403 error) #60

Open
poVoq opened this issue Jul 12, 2024 · 7 comments
Open

Files larger than 10mb fail to upload with Nextcloud app (403 error) #60

poVoq opened this issue Jul 12, 2024 · 7 comments

Comments

@poVoq
Copy link
Contributor

poVoq commented Jul 12, 2024

I have Karadav and php set up to accept files up to 50mb and uploading larger files works fine with the karadav web interface.

However via the desktop Nextcloud app only files smaller than 10mb are being synchronized for some strange reason. Any larger files are seemingly uploaded and then discarded with a 403 forbidden MKCOL error in visible in the Nextcloud app.

Any idea what might be the cause of that?

Edit: I solved the issue with other apps, but the Nextcloud app still reports a 403 error, which is odd, as this is not the 413 error that Nginx or php would give.

Edit: It seems to be somehow related to file permissions? Maybe the Nextcloud client somehow splits uploads larger than 10mb and KaraDAV gets confused with the file permissions on those?

@poVoq poVoq closed this as completed Jul 12, 2024
@poVoq poVoq reopened this Jul 12, 2024
@poVoq
Copy link
Contributor Author

poVoq commented Jul 12, 2024

Seems related: https://help.nextcloud.com/t/error-with-chunked-file-uploads-through-windows-client/123270

So I guess the Nextcloud client uses a temp folder for larger files and then fails to move the file those files due to some permission issue?

@bohwaz
Copy link
Contributor

bohwaz commented Jul 12, 2024

Do you have anything in the error.log?

@poVoq
Copy link
Contributor Author

poVoq commented Jul 12, 2024

Nothing at all in the error.log file, but maybe there is something going wrong there also? Would a failed login attempt be logged there?

@bohwaz
Copy link
Contributor

bohwaz commented Jul 16, 2024

If it's empty, try to enable the HTTP debug log and see what's going on during the upload when the 403 error happens.

@poVoq
Copy link
Contributor Author

poVoq commented Jul 17, 2024

The debug log gives this:

===== ROUTER: Got new request: 17/07/2024 20:26:49 from 192.168.1.1 =====

ROUTER: <= MKCOL /remote.php/dav/uploads/5386c1e7bd9c410d07ffcc88fc2ceb29deafe180/1183742603 (User: povoq)
Request headers:
  Accept-Language: de-DE,en,*
  Accept-Encoding: gzip, deflate
  Cookie: PHPSESSID=*censored*
  X-Request-Id: f31d7789-18ba-4500-84d4-2217a44214d0
  Accept: */*
  User-Agent: Mozilla/5.0 (Linux) mirall/3.13.0git (Nextcloud, fedora-6.9.9-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)
  Authorization: Basic *censored*
  Oc-Total-Length: 16225576
  Destination: https://webdav.example.org/remote.php/dav/files/5386c1e7bd9c410d07ffcc88fc2ceb29deafe180/example/15mbexamplefile.pdf
  Content-Length: 0
  Connection: close
  X-Forwarded-For: xxx.xxx.xxx.xxx
  Host: webdav.example.org
  Content-Type:

ROUTER: <= Request body:


DAV: NC <= MKCOL remote.php/dav/uploads/5386c1e7bd9c410d07ffcc88fc2ceb29deafe180/1183742603 => routed to: chunked

DAV: NC => 403 - Invalid username in URL, does not match logged user

ROUTER: => 403
Response headers:
  X-Powered-By: PHP/8.3.9
  Expires: Thu, 19 Nov 1981 08:52:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate
  Pragma: no-cache

@poVoq
Copy link
Contributor Author

poVoq commented Jul 31, 2024

Anything else I could do to narrow it down?

@KK612
Copy link

KK612 commented Sep 5, 2024

same issue here

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

No branches or pull requests

3 participants