Quota not working, reports underlying disk usage instead of user quota

Nextcloud version: 19.0.3
Running the latest Docker Image on Ubuntu 20.04.

The quota calculation is wrong for - as far as i can tell - all my active users. Instead of calculating the actual contents of th user directories, it reports the usage of the Linux mount that I mounted as a docker volume to /var/www/html (in my case, 178GB).

As a result, any quota <178GB results in the user getting quota exceeded errors, and not being able to upload any files anymore.

I use external SMB shares (using Global Credentials), but that shouldn’t interfere with the quota. I set 'quota_include_external_storage' => false.

Some things that seem weird to me:

  • I ran occ files:scan <username>, and it scans all files in all external shares as well. Is that intended? This will basically scan through our whole filer for every user I invoke this on!!
  • My quota in the files app reports 178GB, like i already mentioned, this is exactly the space used on the root filesystem of the docker host.
  • My user folder under ./data/ on the filesystem consumes basically no space used at all (no symlinks or shenanigans there):
# du -hc
...
644K    total
  • When I go to my “Personal Info” I get completely different values:
    grafik
    none of these makes sense - I neither consume 5.4MB nor do I have a 6.4MB quota.

The output of your Nextcloud log in Admin > Logging:
Almost everything here is PII related to file acces etc…
What i can identify as abnormal is:

  • About a trillion errors saying Trying to access array offset on value of type bool at /var/www/html/custom_apps/deck/lib/Db/CardMapper.php#195 -> this doesn’t look related to any quota stuff. More like a Deck App issue.
  • A few instances of Icewind\SMB\Exception\NotFoundException: Invalid request <file path redacted>

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'trusted_proxies' =>
  array (
    0 => '*',
  ),
  'allow_local_remote_servers' => true,
  'quota_include_external_storage' => false,
  'overwriteprotocol' => 'https',
  'trashbin_retention_obligation' => 'auto, 30',
  'skeletondirectory' => '',
  'forwarded_for_headers' =>
  array (
    0 => 'HTTP_X_FORWARDED',
    1 => 'HTTP_FORWARDED_FOR',
    2 => 'HTTP_X_FORWARDED_FOR',
  ),
  'trusted_domains' =>
  array (
    REDACTED
  ),
  'app.mail.transport' => 'php-mail',
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'nextcloud-redis',
    'port' => '6379',
    'timeout--value=0' => '',
    'timeout' => '0.0',
  ),
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'REDACTED',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => 'http://localhost:8082',
  'dbtype' => 'mysql',
  'version' => '19.0.3.1',
  'dbname' => 'REDACTED',
  'dbhost' => 'REDACTED',
  'dbport' => '',
  'dbtableprefix' => '',
  'mysql.utf8mb4' => true,
  'dbuser' => 'REDACTED',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'loglevel' => 2,
  'memcache' =>
  array (
    'local' => '\\OC\\Memcache\\APCu',
    'locking' => '\\OC\\Memcache\\Redis',
  ),
  'app_install_overwrite' =>
  array (
    0 => 'external',
    1 => 'polls',
    2 => 'extract',
    3 => 'ldapcontacts',
    4 => 'drawio',
    5 => 'keeweb',
  ),
  'theme' => '',
);