Folder ownership transfer does not transfer folder size

Server configuration detail

Operating system: Linux 5.10.0-7-amd64 #1 SMP Debian 5.10.40-1 (2021-05-28) x86_64

Webserver: nginx/1.21.1 (fpm-fcgi)

Database: pgsql PostgreSQL 11.12 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit

PHP version: 7.4.21

Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, pdo_sqlite, session, posix, readline, Reflection, standard, SimpleXML, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, cgi-fcgi, apcu, bcmath, exif, gd, gmp, imagick, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, sodium, zip, Zend OPcache

Nextcloud version: 21.0.3 - 21.0.3.1
Operating system and version : Debian 11

The issue you are facing:

I uploaded about 30GB/150k files worth of data to my user account. I transferred the root folders containing this data to new users. The root folder, under the new owner does not indicate the accurate size showing either 0KB for folders with only other folders in them, or showing only the sum of the files sizes directly in that folder.

Basically, the folder size is no longer recursive

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upload large folder structure
  2. Transfer ownership to another user account
  3. Log into new user account to verify data
  4. See that folder sizes are incorrect

The output of your Nextcloud log in Admin > Logging:

Error	core	Doctrine\DBAL\Query\QueryException: More than 1000 expressions in a list are not allowed on Oracle.		2021-07-14T16:08:51-0400
Error	PHP	Error: fclose(): supplied resource is not a valid stream resource at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#95		2021-07-13T15:38:22-0400
Error	PHP	Error: fclose(): supplied resource is not a valid stream resource at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#95		2021-07-13T15:38:22-0400
Error	PHP	Error: fclose(): supplied resource is not a valid stream resource at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#95		2021-07-09T14:08:23-0400
Error	PHP	Error: fclose(): supplied resource is not a valid stream resource at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#95		2021-07-09T14:08:21-0400
Error	PHP	Error: fclose(): supplied resource is not a valid stream resource at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#95		2021-07-09T14:08:20-0400
Error	PHP	Error: fclose(): supplied resource is not a valid stream resource at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#95		2021-07-09T14:08:20-0400

That last error, which seems like it should have been fixed here: 21.0.1 final by rullzer · Pull Request #26453 · nextcloud/server · GitHub apparently was not fixed?

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

<?php
$CONFIG = array (
  'objectstore' => 
  array (
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' => 
    array (
      'bucket' => '',
      'autocreate' => true,
      'key' => '',
      'secret' => '',
      'hostname' => '',
      'port' => '',
      'use_ssl' => false,
      'region' => '',
      'use_path_style' => true,
    ),
  ),
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
  ),
  'datadirectory' => '/var/nc-data',
  'dbtype' => 'pgsql',
  'version' => '21.0.3.1',
  'overwrite.cli.url' => '',
  'dbname' => '',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'trusted_proxies' => 
  array (
    0 => '',
  ),
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
    'timeout' => 0,
    'password' => '',
  ),
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\MarkDown',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\TXT',
    8 => 'OC\\Preview\\Illustrator',
    9 => 'OC\\Preview\\Movie',
    10 => 'OC\\Preview\\MSOffice2003',
    11 => 'OC\\Preview\\MSOffice2007',
    12 => 'OC\\Preview\\MSOfficeDoc',
    13 => 'OC\\Preview\\OpenDocument',
    14 => 'OC\\Preview\\PDF',
    15 => 'OC\\Preview\\Photoshop',
    16 => 'OC\\Preview\\Postscript',
    17 => 'OC\\Preview\\StarOffice',
    18 => 'OC\\Preview\\SVG',
    19 => 'OC\\Preview\\TIFF',
    20 => 'OC\\Preview\\Font',
  ),
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_facto' => 1,
  'auth.bruteforce.protection.enabled' => true,
  'trashbin_retention_obligation' => 'auto,7',
  'skeletondirectory' => '/var/www/html/core/skeleton',
  'defaultapp' => 'file',
  'activity_expire_days' => 14,
  'integrity.check.disabled' => false,
  'updater.release.channel' => 'stable',
  'loglevel' => 1,
  'maintenance' => false,
  'theme' => '',
  'default_phone_region' => 'US',
  'onlyoffice' => 
  array (
    'DocumentServerUrl' => '/ds-vpath/',
    'DocumentServerInternalUrl' => '',
    'StorageUrl' => 'http://nginx/',
  ),
  'allow_local_remote_servers' => 'true',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtphost' => '',
  'mail_domain' => '',
  'mail_from_address' => '',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
);

Should I open an issue on github?