NC 13.0.6 - Used quota from NC is different from used quota informed by linux

In display web is reported 152GB used. 
In linux the du -sh command report 345GB used (is not from trash_bin folder, but files folder were archives are).
The storage is local
string in /etc/fstab mount:
UUID=xxxxx-yyyyy-aaaa-dddd-cccccccccc /               ext4    errors=remount-ro 0       1

Nextcloud version 13.0.6
Operating system and version Ubuntu 16.04.5
Apache or nginx version apache2/stable,now 2.4.25-3+deb9u4
PHP version php7.0/stable,stable,now 7.0.27-0+deb9u1

Steps to replicate it:

  1. install nextcloud 13.x in ubuntu
  2. start sincronize files from pc
  3. compare the used quota reported by nextcloud web to du -sh command from linux. Detail: i execute du -sh in files folder (not considering used space by trash_bin, versions or upload folders)
<?php
$CONFIG = array (
  'versions_retention_obligation' => 'auto,60',
  'trashbin_retention_obligation' => 'auto,60',
  'knowledgebaseenabled' => 'false',
  'cipher' => 'AES-256-CFB',
  'appstoreenabled' => 'true',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' =>
  array (
    0 => 'xxxxxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '13.0.6.1',
  'dbname' => 'ddddddd',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'aaaaaaa',
  'dbpassword' => 'aaaaaaa',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'dedes',
  'mail_domain' => 'ddddddd',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'dddddddd',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'dddddd',
  'mail_smtppassword' => 'dddddddd',
  'updater.secret' => 'dddddddd',
  'maintenance' => false,
  'theme' => '',
  'quota_include_external_storage' => true,
  'filesystem_check_changes' => 1,
  'logfile' => '/var/log/nextcloud.log',
  'loglevel' => '2',
  'log_rotate_size' => '104857600',
);
Apache error.log
[Thu Sep 27 11:43:26.994691 2018] [mpm_prefork:notice] [pid 191] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Thu Sep 27 11:43:26.994933 2018] [core:notice] [pid 191] AH00094: Command line: '/usr/sbin/apache2'

I found the bug.

The problem is that nextcloud create several ocTransferId*.part files in folders.
Is not delete then.
So, i make:
“sudo find /var/www/nextcloud/data -name “ocTransferId.part” -delete” and everything is ok now.
is important investigate this, Maybe more preople is with this problem and thinking the problem is other thing.

I will include in my cron job the command.

It´s funny but I also detected some of them using “sudo find /usr/data/nextcloud/data/ -name “ocTransferId.part” | wc -l” which gave me 7 files, 6 of them from February, 1 from August this year.

I don´t know why they´re there, but I manually deleted them.

I also found an old OwnCloud thread on this: https://central.owncloud.org/t/safe-to-delete-octransferid-part-files-on-server/8345/2