Skip to content

wrong user quota in the user administration #38874

Description

⚠️ This issue respects the following points: ⚠️

Bug description

Entering 10GB will allocate 10.7GB as the storage size. 1GB becomes 1.1GB, 500 becomes 575.5GB.

Steps to reproduce

  1. Go to user management
    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?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

Activity

  1. ghost added
    0. Needs triage
    on Jun 18, 2023
  2. ghost added on Jun 18, 2023
  3. jalil-salame commented on Jun 20, 2023

    @jalil-salame

    I can replicate this using the NixOS configuration for nextcloud27

  4. LuXc-NL commented on Jun 30, 2023

    @LuXc-NL

    Encountered the same issue..

  5. dgedgedge commented on Jul 3, 2023

    @dgedgedge

    More or less same issue :

    I have a user with 850GB of files.
    If I try to put 1000GB then it goes to unlimited and / or 1GB...
    I saw both.

    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 apps

    Enabled:

    • activity: 2.18.0
    • admin_audit: 1.16.0
    • analytics: 4.9.4
    • announcementcenter: 6.6.1
    • bookmarks: 13.0.1
    • bruteforcesettings: 2.6.0
    • calendar: 4.4.3
    • carnet: 0.24.7
    • checksum: 1.2.2
    • circles: 26.0.0
    • cloud_federation_api: 1.9.0
    • collectives: 2.5.0
    • comments: 1.16.0
    • contacts: 5.3.2
    • contactsinteraction: 1.7.0
    • cookbook: 0.10.2
    • dashboard: 7.6.0
    • dav: 1.25.0
    • deck: 1.9.2
    • drawio: 2.1.1
    • federatedfilesharing: 1.16.0
    • files: 1.21.1
    • files_external: 1.18.0
    • files_mindmap: 0.0.28
    • files_pdfviewer: 2.7.0
    • files_rightclick: 1.5.0
    • files_sharing: 1.18.0
    • files_trashbin: 1.16.0
    • files_versions: 1.19.1
    • firstrunwizard: 2.15.0
    • geoblocker: 0.5.11
    • keeweb: 0.6.13
    • logreader: 2.11.0
    • lookup_server_connector: 1.14.0
    • mail: 3.2.3
    • maps: 1.0.2
    • music: 1.8.4
    • nextcloud_announcements: 1.15.0
    • notes: 4.8.0
    • notifications: 2.14.0
    • oauth2: 1.14.0
    • password_policy: 1.16.0
    • photos: 2.2.0
    • previewgenerator: 5.3.0
    • privacy: 1.10.0
    • provisioning_api: 1.16.0
    • recommendations: 1.5.0
    • related_resources: 1.1.0-alpha1
    • serverinfo: 1.16.0
    • settings: 1.8.0
    • sharebymail: 1.16.0
    • spreed: 16.0.4
    • support: 1.9.0
    • survey_client: 1.14.0
    • systemtags: 1.16.0
    • tasks: 0.15.0
    • text: 3.7.2
    • theming: 2.1.1
    • twofactor_backupcodes: 1.15.0
    • updatenotification: 1.16.0
    • user_status: 1.6.0
    • viewer: 1.10.0
    • weather_status: 1.6.0
    • workflowengine: 2.8.0
      Disabled:
    • encryption
    • federation: 1.10.1
    • suspicious_login: 4.3.0
    • twofactor_totp
    • user_ldap
    Configuration (config/config.php)

    {
    "instanceid": "REMOVED SENSITIVE VALUE",
    "passwordsalt": "REMOVED SENSITIVE VALUE",
    "secret": "REMOVED SENSITIVE VALUE",
    "trusted_domains": [


    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "******",
    "dbtype": "mysql",
    "version": "26.0.3.2",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "loglevel": 2,
    "logtimezone": "Europe\/Paris",
    "logfile": "\/var\/log\/nextcloud.log",
    "log_rotate_size": 0,
    "installed": true,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "share_folder": "\/SharedWithMe",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "theme": "",
    "default_phone_region": "FR",
    "updater.release.channel": "stable",
    "mail_smtpauth": 1,
    "mail_sendmailmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mysql.utf8mb4": true,
    "trashbin_retention_obligation": "auto, 100",
    "has_rebuilt_cache": true,
    "app_install_overwrite": [
        "files_reader"
    ],
    "bulkupload.enabled": false
    

    }

    Cron Configuration: Array
    (
    [backgroundjobs_mode] => cron
    [lastcron] => 1688364922
    )

    External storages: yes

    External storage configuration

    No 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

  6. Zeroth42 commented on Jul 4, 2023

    @Zeroth42

    Is there a fix for that? I have the same problem.

  7. albig commented on Jul 4, 2023

    @albig

    1. Entering manually "50 GB" ...

    2023-07-04_16-33

    2. ... results in "unlimited"

    2023-07-04_16-33_1

    3. ... which is shown as "0" after saving.

    2023-07-04_16-33_2


    Selecting 10 GB from drop down results in 10,7 GB.

    2023-07-04_16-36

  8. Zeroth42 commented on Jul 4, 2023

    @Zeroth42

    If you calculate, it is always 7.4% higher than that what you type in

  9. dgedgedge commented on Jul 5, 2023

    @dgedgedge

    I have it illimited :
    Capture d’écran 2023-07-05 à 09 27 39

    Previously, it was consistent to have a warning because I gave the account only 900GB.
    I tried to put 1000GB, but nextcloud understood 1GB => I did put it back to unlimited.

    Overall is also OK :

    Capture d’écran 2023-07-05 à 09 32 20

    Note: It's an installation upgraded from release to release since multiple years.
    Recently I upgraded from bullsseye to bookworm then the nextcloud.

  10. kurjajuur666 commented on Jul 6, 2023

    @kurjajuur666

    Got the same issue on a couple of Nextcloud 27 instances and an instance running 27.0.0 RC1.
    e: same in 27.0.1rc1

  11. florianwgnr commented on Jul 10, 2023

    @florianwgnr

    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?

  12. arnowelzel commented on Jul 19, 2023

    @arnowelzel
    Contributor

    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 10*1000*1000*1000 Bytes = 10,000,000,000 Bytes.

    However it can also be: 10*1024*1024*1024 Bytes = 10,737,418,240 Bytes.

    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 1*1024*1024*1024 and not as 1*1000*1000*1000 - even if this is not completely correct since the unit for binary based values is "GiB" and not "GB". If no unit is entered but only a plain number, then treat the number as it is but still display it as "KB", "MB", "GB" depending on how large the value is.

    So when I input "10 GB" this should mean 10*1024*1024*1024 and when I input "1000000" this will mean 1000000 bytes or 976.56 KB (maybe we also do a internal rounding for a maximum of two digits for fractional parts).

    About displaying the quota values:

    • When the quota is less then 1*1024 bytes: display as it is, e.g. "500".
    • When the quota is between 1*1024 and 1024*1024-1 bytes: display value/1024 as "KB", e.g. 2048 -> "2 KB" (2048/1024)
    • When quota is between 1024*1024 and 1024*1024*1024-1 bytes: display value/1024/1024 as "MB", e.g. 52428800 -> "50 MB" (52428800/1024/1024)
    • When quota is 1024*1024*1204 or more: display value/1024/1024/1024 as "GB", e.g. 10737418240 -> "10 GB" (10737418240/1024/1024/1024)
  13. arnowelzel commented on Jul 19, 2023

    @arnowelzel
    Contributor

    1. Entering manually "50 GB" ...

    2023-07-04_16-33

    2. ... results in "unlimited"

    2023-07-04_16-33_1

    3. ... which is shown as "0" after saving.

    2023-07-04_16-33_2

    Selecting 10 GB from drop down results in 10,7 GB.

    2023-07-04_16-36

    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 50 GB input will be interpreted as 50*1024*1024*1024 bytes but the display will then show the value devided as 50/1000/1000/1000.

  14. microniko commented on Jul 19, 2023

    @microniko

    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 50 GB input will be interpreted as 50*1024*1024*1024 bytes but the display will then show the value devided as 50/1000/1000/1000.
    You're right but it is not very intuitive ;-)

  15. 35 remaining items

  16. ryester19 commented on Oct 27, 2023

    @ryester19

    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

  17. ryester19 commented on Dec 12, 2023

    @ryester19

    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

  18. AndyXheli commented on Dec 12, 2023

    @AndyXheli
    Contributor

    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

  19. susnux commented on Dec 13, 2023

    @susnux
    Contributor

    yes for the files app this is a regression of 32c1aeb

  20. reopened this on Dec 13, 2023
  21. Menelion commented on Oct 9, 2024

    @Menelion

    Sorry, what's the current status of this issue? for me, if I enter 100 GB manually, it returns 93.1 GB. the only way to have it at 100 Gb is to enter 1073741824, i.e. 1024 * 1024 * 1024.

  22. RikkiBC commented on Oct 9, 2024

    @RikkiBC

    Sorry, what's the current status of this issue? for me, if I enter 100 GB manually, it returns 93.1 GB. the only way to have it at 100 Gb is to enter 1073741824, i.e. 1024 * 1024 * 1024.

    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?

  23. Menelion commented on Oct 9, 2024

    @Menelion

    @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.

  24. RikkiBC commented on Oct 10, 2024

    @RikkiBC

    @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.

  25. susnux commented on Oct 10, 2024

    @susnux
    Contributor

    I can not reproduce this issue is still fixed also for 30.

    And the Files app is at 2.0.0.

    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.

  26. Menelion commented on Oct 10, 2024

    @Menelion

    Oh sorry, my bad, it's 2.2.0 actually:

    Enabled:
      - activity: 3.0.0
      - bruteforcesettings: 3.0.0
      - circles: 30.0.0-dev
      - cloud_federation_api: 1.13.0
      - comments: 1.20.1
      - contactsinteraction: 1.11.0
      - dashboard: 7.10.0
      - dav: 1.31.1
      - federatedfilesharing: 1.20.0
      - federation: 1.20.0
      - files: 2.2.0
      - files_downloadlimit: 3.0.0
    [...]
    
  27. susnux commented on Oct 10, 2024

    @susnux
    Contributor

    Latest 30.0.1 RC2:

    Bildschirmaufnahme_20241010_155340.webm

    I can not reproduce, maybe try to clear the cache. But this should already be fixed long ago.

  28. Menelion commented on Oct 10, 2024

    @Menelion

    @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.

  29. susnux commented on Oct 11, 2024

    @susnux
    Contributor

    Basically what I am doing in the video is:

    1. Go to account settings
    2. Set quota of user to "100 GB" (it is then already shown as 100GB in the settings)
    3. Go to files app
    4. The quota information in the app navigation is showing "0B of 100GB used" as expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions