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

Users can exeed their quota and fill the server storage #29199

Closed
hex-m opened this issue Oct 13, 2021 · 6 comments
Closed

Users can exeed their quota and fill the server storage #29199

hex-m opened this issue Oct 13, 2021 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info

Comments

@hex-m
Copy link

hex-m commented Oct 13, 2021

A Nextcloud servers storage can be filled by a normal user thus limiting the service for everyone.

My Android-Client uploads big files (~5 GB) regularly. As it only uploads while in wifi the transfers are regularly interrupted. My Account has a quota of 13 GB.

Today I noticed the local disk was full. Checking the problem I noticed I had > 50 GB in my accounts uploads folder.

#8759 mentions that there should be a background task cleaning things up. For some reason this didn't happen in my case.

Others seem to have the same problem: #8753 (comment), #8759 (comment), #19034, #14871

This seems like a serious issue because a malicious user can use this to have a negative impact on the availability of the service.

Expected behaviour

Give admins a way to make sure users don't use more storage than they should. Maybe the uploads folder should never grow bigger than the quota of the user? I don't know the sync-protocol well enough to suggest a more aggressive cleanup method.

Server configuration

Nextcloud version: 21.0.5 (but probably more versions are affected)

Nextcloud log (data/nextcloud.log)

Lots of errors about Insufficient space

@hex-m hex-m added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 13, 2021
@funbotan
Copy link

funbotan commented Feb 8, 2022

Same problem on my installation. Unfortunately, I don't see an easy fix, as users are permitted to upload large files that may exceed their quota into external storage, and that has to go through uploads as well.

@habakuk007
Copy link

Same for me on Nextcloud 24.0.6

I use the Android App to sync my pictures from my smartphone. After reinstalling the app (and resyncing all of my photos) I have to delete the upload folder every couple of hours because my quota is full...

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

@gonzalo
Copy link
Contributor

gonzalo commented Feb 15, 2023

Similar problem here. Using Nextcloud 25.0.1.1

  1. Uploading through web UI a big file (1.7 GB)
  2. during the process I set the maintenance mode on with occ
  3. after a few seconds the UI informs that maitenance mode has been set
  4. check with du "du -sh /xxxxx/xxxxx/userXXXX/uploads/" that folder has 541MB
  5. after cron execution nothing changes, the chuncks remain here

occ file:cleanup has no effect.

This is especially worrying issue for us as we want to schedule a daily maintenance window for backups and it can collide with user uploads. There's no procedure set up in system to prevent this issue?

There is some manual operation that we can run to prevent wasting our filesystem? (I mean, with occ, not using our shell)

@szaimen szaimen closed this as completed Mar 6, 2023
@gonzalo
Copy link
Contributor

gonzalo commented Mar 6, 2023

Sorry for not inform but the cronjobs take care of this after 24 hours and remove partial uploads, so this issue is not an issue. Nextcloud takes care of the incomplete uploads.

@szaimen
Copy link
Contributor

szaimen commented Mar 6, 2023

All right! Thanks for verifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info
Projects
None yet
Development

No branches or pull requests

5 participants