nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.45k stars 3.98k forks source link

[Bug]: Directory uploads Fills Webspace After Quota Limit Exceeded #37767

Open dautrich opened 1 year ago

dautrich commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

This is a follow-up of (closed) bug report #29199, as requested there. I run a Nextcloud 25.0.5 in a shared web hosting space. Disk space in the hosting package is limited to 80 GB. There are only two Nextcloud users, plus admin. One of the users had a quota limit of 1 GB, but tried to upload a directory of about 1.8 GB, using the sync mechanism of the Windows client. After the quota limit was reached, something went topsy-turvy. The webspace was completely filled up. Login to the Nextcloud didn't work anymore. Examining with Filezilla, I found that the directory 'uploads' in the user's file space contained several thousands of subdirectories with randomly built filenames. Deleting the content of directory 'uploads' solved the issue for the moment. Then I increased the user's quota limit to 5 GB. After that, the remaining rest of the files seems to have been synched to the Nextcloud without user intervention. But thereafter, the uploads directory again contained several hundreds of subdirectories, which I had to manually delete again.

Steps to reproduce

  1. Create a user with a quota limit.
  2. Make him sync a directory with (directory size >> quota limit) to the user's Nextcloud file system.
  3. Watch what happens after the quota limit is exceeded

Expected behavior

After reaching the quota limit, the synch process should be stopped immediately. Temporary directories/files in the user's 'uploads' directory should be deleted.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

25

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 22.2.3 to 22.2.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

Activity    2.17.0
Brute-force settings    2.5.0
Calendar    4.3.3
Circles 25.0.0
Collaborative tags  1.15.0
Comments    1.15.0
Contacts    5.2.0
Custom menu 3.7.4
Dashboard   7.5.0
Deleted files   1.15.0
Federation  1.15.0
File sharing    1.17.0
First run wizard    2.14.0
Log Reader  2.10.0
Monitoring  1.15.0
Nextcloud announcements 1.14.0
Notifications   2.13.1
Password policy 1.15.0
PDF viewer  2.6.0
Photos  2.0.1
Privacy 1.9.0
Recommendations 1.4.0
Related Resources   1.0.4
Right click 1.4.0
Share by mail   1.15.0
Splash  2.2.0
Support 1.8.0
Tasks   0.14.5
Text    3.6.0
Two-Factor TOTP Provider    7.0.0
Update notification 1.15.0
Usage survey    1.13.0
User status 1.5.0
Versions    1.18.0
Weather status  1.5.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

dautrich commented 1 year ago

nextcloud.log.zip

solracsf commented 1 year ago

Expected behavior

After reaching the quota limit, the synch process should be stopped immediately. Temporary directories/files in the user's 'uploads' directory should be deleted.

They are, but not just after upload fails; they are handled by a background job (every hour ifI remember correctly).

dautrich commented 1 year ago

@solracsf In my webspace, there obviously was no background job to handle the situation. The directories/files in the user's 'uploads' directory were still there, taking all my available webspace. Who would be responsible for such a type of (cron) job: The installed Nextcloud instance? The webspace provider?

solracsf commented 1 year ago

Nextcloud cronjob.