Sync external storage via nextcloud command line client

I am running Nextcloud 16.0.8 on an Ubuntu 18.04 virtual machine, containing a roughly 30.000 files and 400 GB. Everything working fine so far.

Now, I have started to use S3 as an external storage. Putting files via the desktop client and syncing them to another computer works perfectly.
When I use the command line client, receiving and uploading files which are not on S3 works fine as well. Also receiving files, which are put by the desktop client to S3 works. But when I want to use the command line client to upload a file to the external storage on S3, I cannot show the content of the file afterwards neither in the web gui nor with the desktop client.
The error message in the log is:
[webdav] Fatal: OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature at <>

  1. /var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php line 467
    OCA\Encryption\Crypto\Crypt->checkSignature(β€œgX/INXe7NVO0z53 … =”, null, β€œ39be2dccaaec79e … 8”)
  2. /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 ***")
  3. /var/www/nextcloud/lib/private/Files/Stream/Encryption.php line 479
    OCA\Encryption\Crypto\Encryption->decrypt("*** sensitive parameters replaced ***")
  4. /var/www/nextcloud/lib/private/Files/Stream/Encryption.php line 299
    OC\Files\Stream\Encryption->readCache()
  5. <>
    OC\Files\Stream\Encryption->stream_read(8192)
  6. /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php line 91
    undefinedundefinedfread(null, 8192)
  7. /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php line 98
    Icewind\Streams\Wrapper->stream_read(8192)
  8. <>
    Icewind\Streams\CallbackWrapper->stream_read(8192)
  9. /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php line 80
    undefinedundefinedstream_copy_to_stream(null, null, β€œ8664”)
  10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 498
    Sabre\HTTP\Sapi::sendResponse(Sabre\HTTP\Response {})
  11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque … "}, Sabre\HTTP\Response {})
  12. /var/www/nextcloud/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
  13. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  14. /var/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/var/www/nextcl … p")

GET /remote.php/dav/files/marc/.idea/codeStyleSettings.xml
from 131.117.153.92 by marc at 2020-03-30T21:41:10+00:100:

Do you need any additional information? Any ideas for the cause of this issue?

EDIT: Another test by uploading the file via the webinterface leads to the same problem. Uploading to S3 works only via the desktop client reliably.