Error Copying/Moving Files to External Storage Via WebUI & Error Deleting Folders

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04.3
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29
PHP version (eg, 7.1): PHP 7.2.24

The issue you are facing:

I’m facing an error when trying to delete folders that have data inside them, and are stored on an external storage.

When I copy or move files via the Web UI (only the WEB UI) into external storage (Local, attached DO VOLUME), it copies over the files, but they get corrupted mostly. (PNG, JPG, PDF etc). Then, I also cannot delete folders, unless I delete all files inside first. Once the folder doesn’t have anything inside. I can delete it. This only happens via the Web UI, as using the Mac App I can easily transfer data back and forth. This issue also doesn’t come up for folders created inside the external storage to begin with.

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

Steps to replicate it:

  1. Attach External Storage
  2. Move or Copy folder from main storage to external storage
  3. Try to open PNG or PDF files
  4. Try to delete the folder with files inside
  5. Delete files in folder
  6. Delete folder

The output of your Nextcloud log in Admin > Logging:

No New Entries for Today

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

$CONFIG = array (
  'passwordsalt' => '***********',
  'secret' => '*************',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '',
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'ncadmin',
  'dbpassword' => '**********@********',
  'installed' => true,
  'instanceid' => '********',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => '2',
  'mail_smtpmode' => 'smtp',
  'remember_login_cookie_lifetime' => '1800',
  'log_rotate_size' => '10485760',
  'trashbin_retention_obligation' => 'auto, 180',
  'versions_retention_obligation' => 'auto, 365',
  'simpleSignUpLink.shown' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => '***********',
  'logtimezone' => 'Asia/Nicosia',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,

The output of your Apache/nginx/system log in /var/log/____:

[Fri Jan 17 06:39:22.658095 2020] [mpm_event:notice] [pid 952:tid 139860880395200] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 configured -- resuming normal operations
[Fri Jan 17 06:39:22.658138 2020] [core:notice] [pid 952:tid 139860880395200] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 17 12:12:18.126434 2020] [proxy_fcgi:error] [pid 3883:tid 139860760127232] [client] AH01067: Failed to read FastCGI header
[Fri Jan 17 12:12:18.129508 2020] [proxy_fcgi:error] [pid 3883:tid 139860760127232] (104)Connection reset by peer: [client] AH01075: Error dispatching request to : 
[Fri Jan 17 13:07:28.500380 2020] [proxy_fcgi:error] [pid 18810:tid 139860483151616] (70007)The timeout specified has expired: [client] AH01075: Error dispatching request to : (polling)

I was trying to replicate the issue, and finally managed to get some errors into the log. This is what was happening when I was trying to delete files:

[webdav] Fatal: OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature at <<closure>>

 0. /var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php line 467
    OCA\Encryption\Crypto\Crypt->checkSignature("jQUdQ+elRwGnDN0 ... I", null, "6defeb16803a9f5 ... c")
 1. /var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php line 379
    OCA\Encryption\Crypto\Crypt->symmetricDecryptFileContent("*** sensitive parameter replaced ***", null, "AES-256-CTR", "*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 2. /var/www/nextcloud/lib/private/Files/Stream/Encryption.php line 504
    OCA\Encryption\Crypto\Encryption->decrypt("*** sensitive parameters replaced ***")
 3. /var/www/nextcloud/lib/private/Files/Stream/Encryption.php line 299
 4. <<closure>>
 5. /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php line 91
    undefinedundefinedfread(null, 8192)
 6. /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php line 98
 7. <<closure>>
 8. /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php line 80
    undefinedundefinedstream_copy_to_stream(null, null, "17416")
 9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 498
    Sabre\HTTP\Sapi::sendResponse(Sabre\HTTP\Response {})
10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
11. /var/www/nextcloud/apps/dav/lib/Server.php line 317
12. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
13. /var/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/var/www/nextcl ... p")

GET /remote.php/dav/files/julian/Large%20File%20Store/Clients/EMS/code/Face%20Recognition%20Open%20CV%20Office/opencv-3.4.1/tinydnn/tiny-dnn-1.0.0a3/third_party/gemmlowp/internal/pack_SSE.h
from by julian at 2020-01-17T13:34:59+02:100:

Found possible related issue on Github:

From my understanding, this is a encyrption error. When moving/copying large amounts of files into the external storage, something in the encryption mechanism breaks.

The error presists…