-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
wrong user quota in the user administration #38874
Comments
I can replicate this using the NixOS configuration for nextcloud27 |
Encountered the same issue.. |
More or less same issue :I have a user with 850GB of files. Server configuration detail Operating system: Linux 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 Webserver: Apache (fpm-fcgi) Database: mysql 10.11.3 PHP version: 8.2.7 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache Nextcloud version: 26.0.3 - 26.0.3.2 Updated from an older Nextcloud/ownCloud or fresh install: Where did you install Nextcloud from: unknown Signing status[] List of activated appsEnabled:
Configuration (config/config.php){
} Cron Configuration: Array External storages: yes External storage configurationNo mounts configured Encryption: no User-backends: OC\User\Database Talk configuration: STUN servers TURN servers turn:*******- udp,tcp Signaling servers (mode: default): no custom server configured Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:109.0) Gecko/20100101 Firefox/114.0 |
Is there a fix for that? I have the same problem. |
If you calculate, it is always 7.4% higher than that what you type in |
Previously, it was consistent to have a warning because I gave the account only 900GB. Overall is also OK : Note: It's an installation upgraded from release to release since multiple years. |
Got the same issue on a couple of Nextcloud 27 instances and an instance running 27.0.0 RC1. |
Same thing for me, all quotas set to 10GB are 10.7GB after the update. Also i noticed that more space is used. Did something within the calculation change? |
It looks like the value entered will be treated as binary based values (2^x) but the display will be the decimal based value (10^x). Also when editing the quota value, the input field becomes empty (at least in my installation with NC 27) even when the quota is saved. For example: 10 GB can be interpreted as decimal based value which is However it can also be: When the resulting value is then displayed as "decimal based" GB it will be become "10,7 GB" even the user has entered "10 GB" as value. I would suggest to interpret units like "GB" or "MB" always as binary based since many operating systems and applications see "1 GB" as So when I input "10 GB" this should mean About displaying the quota values:
|
Nextcloud will store the limit corectly, just the initial view update is wrong. So if you enter "50 GB", press enter and then save the user, it will display "unlimited" first - but when you refresh the user list, you will see "53,68 GB" as value (because |
|
cc @nextcloud/server |
I noticed that unit issue too, GB entered will be treated as GiB (gibibyte, base 2 (1024³)) but shown as GB (gigabyte, base 10 (1000³)). |
I tried changing my quota a few different ways on Nextcloud 27.0.1 with macOS client version 3.9.1.
Using the web interface never gives a correct result: "1 TB" is of course ambiguous; but while the user could have meant 1000 GB or 1024 GiB, "1,126 GB" is wrong. "1000000000000 B" is unambiguous; it's 10^12 bytes, 1000 GB, or 931 GiB, but "1,024 GB" is wrong. Using The only unambiguous way to set a quota, then, appears to be using
does the right thing, but the results are displayed inconsistently. The web UI displays the technically correct "1 TB" while the desktop client shows the incorrect-but-excusable "931 GB." Anyway, I hope this is helpful to someone. Please let me know if I can be of assistance. |
Just want to add that its not only the quota, but its just the way its shown on the nextcloud website. |
Yea, this happens not only in admin user settings page but also in Files app on user quota display and folder display. |
You'r right |
I have the same issues since I've updated Nextcloud from version 26 to 27...
So both UI outputs are wrong, or different from what I've entered. But looking into the real "data/user/files" folder with 'ncdu' and 'du -sh', I get: So yes, the user account UI seems "more correct", but I didn't enter 107 GB as quota, I did enter 100 GB! And even if it wouldn't matter because of just a different calculation, I think this is confusing for most users. Bye... :-) |
This issue doen't in milestone 27.0.2 |
No, it does not have anything to do with PHP 8.2. It happens with PHP 8.1 as well. |
My PHP is extremely rusty, and I've never written TypeScript or Vue before. I think I can submit a patch for this, but I would like some advice on strategy. Here's what I think is happening:
Example:
Edit: The bad conversion only happens once before the value is stored, not twice. See: It seems that the possible solutions are:
I personally like (1) because the frontend and backend are both computers, so it seems that there's no real reason for them to be exchanging human-friendly units. |
Good to know, then maybe (hopefully) it is already fixed in version 27.0.2...? @bguzzardi: |
Still not fixed on 27.0.2 ... |
Sorry - but there is no need to comment about missing fixes. If the issue will be fixed, then you will see at least a pull request here for the code changes and issue itself would be closed as well. |
I can confirm it's my exact issue. Thanks for mentioning it. |
Still an issue on NC 27.1.1 |
Fixed with #40605 |
Hey @susnux just a quick update so i updated to NC 27.1.2 and the user quota under the user tab is now looking good but the quote under this section is still wrong |
The fix should have been for the entire webui, because even the values in the file apps are wrong, can you confirm the sizes in your files app are also wrong? And that only the quota page is good |
Hmm so under the IOS app it now shows 1TB and that is correct Android app shows 1024GB and that should be 1TB I cleared browser cache too and same results. |
@AndyXheli that happens because the files app is not using the global function but the library directly. |
So this issue is not fixed yet, shouldn't it be marked open again? I have the same on 27.1.2. The quota in the user admin page is correct, but the quota on the files app is incorrect as per above descriptions. |
Newest is 27.1.3, and it's fixed over here |
The issue has come back for the user's sidebar when I upgraded to 28.0.0. The admin's user page is still displaying the quota correctly |
Same mine is showing 180.4 GB used from 1.1TB Admin portal shows 168 used from 1TB the admin portal is the correct one |
yes for the files app this is a regression of 32c1aeb |
Sorry, what's the current status of this issue? for me, if I enter |
This originally affected me too but was fixed for a long time, the version after the commit linked by Susnux when they closed this in December 15 2023 (just above your comment). I just tested and it's still fixed for me now too. @Menelion - what version of Nextcloud are you on? |
@RikkiBC I'm on the latest version, I've just installed it three days ago or so. From system info text file: Nextcloud version: 30.0.0 - 30.0.0.14 And the Files app is at 2.0.0. |
Ah! Might be worth opening another issue then. I'm on latest stable AIO version (Nextcloud 29.0.7) so if you're getting it now it's worth discussing in a new bug report separately as a regression I believe. |
I can not reproduce this issue is still fixed also for 30.
This then sounds more like your update process is broken, files is shipped with Nextcloud and in Nextcloud 30 the files version is 2.2.0. |
Oh sorry, my bad, it's 2.2.0 actually:
|
Latest 30.0.1 RC2: Bildschirmaufnahme_20241010_155340.webmI can not reproduce, maybe try to clear the cache. But this should already be fixed long ago. |
@susnux I can't see the video since I'm blind, but I believe you of course. How can we debug? It's a fresh installation, Apache, MariaDB, Ubuntu, performed with install script. |
Basically what I am doing in the video is:
|
Bug description
Entering 10GB will allocate 10.7GB as the storage size. 1GB becomes 1.1GB, 500 becomes 575.5GB.
Steps to reproduce
2.Specify an Arbitrary size for the user disk space and see how it becomes a different size.
Expected behavior
Installation method
Community Docker image
Nextcloud Server version
27
Operating system
None
PHP engine version
None
Web server
None
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
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
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: