Nextcloud Encryption Error

Hello Nextcloud-Community, I’ve been facing an issue regarding server-side encryption and I hope someone can help me, since I don’t really know what else to try.

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 27.1.5-apache on Docker
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 10 Buster
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Nginx 1.14.2
  • PHP version (e.g, 8.3):
    • 8.2.14
  • Is this the first time you’ve seen this error? (Yes / No):
    • every time I've tried

Summary of the issue you are facing:

If I turn on the default encryption module in apps and enable the server side encryption checkbox in the admin settings, everything seems to work fine. But as soon as I try to run

sudo docker exec -u www-data -it ******* php occ encryption:encrypt-all

to encrypt all existing data, I get a “Exception thrown: OCP\Files\NotFoundException” error spammed into my terminal and at some point the encryption cancels. The same thing happens when running decrypt-all.

Steps to replicate it

  1. Enable default encryption module and server-side encryption
  2. run sudo docker exec -u www-data -it ******* php occ encryption:encrypt-all

→ i have NOT been able to replicate this error on our development environment, so it might be related to our specific system / setup.

Log entries

Nextcloud.log entry from a decrypt-all, but the log entry is almost identical

[--------->------------------]{"reqId":"vU5OPJzvF4ZRXr48fZCV","level":3,"time":"2024-12-10T17:43:52+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/xxxxx/occ","message":"Exception thrown: OCP\\Files\\NotFoundException","userAgent":"--","version":"27.1.5.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Node/Node.php","line":367,"function":"getFileInfo","class":"OC\\Files\\Node\\Node","type":"->","args":[false]},{"file":"/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php","line":358,"function":"getOwner","class":"OC\\Files\\Node\\Node","type":"->","args":[]},{"file":"/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php","line":301,"function":"getPathForNode","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->","args":[["OC\\Files\\Node\\NonExistingFile"]]},{"file":"/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php","line":118,"function":"rename_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->","args":[["OC\\Files\\Node\\NonExistingFile"],["OC\\Files\\Node\\File"]]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeRenamedEvent"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeRenamedEvent"],"OCP\\Files\\Events\\Node\\NodeRenamedEvent",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"]],"OCP\\Files\\Events\\Node\\NodeRenamedEvent",["OCP\\Files\\Events\\Node\\NodeRenamedEvent"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeRenamedEvent"],"OCP\\Files\\Events\\Node\\NodeRenamedEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Files\\Events\\Node\\NodeRenamedEvent",["OCP\\Files\\Events\\Node\\NodeRenamedEvent"]]},{"file":"/var/www/html/lib/private/Files/Node/HookConnector.php","line":197,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeRenamedEvent"]]},{"file":"/var/www/html/lib/private/legacy/OC_Hook.php","line":105,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->","args":[["/Fotos/Toucan.jpg.decrypted.1733849032","/Fotos/Toucan.jpg"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":837,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_rename",["/Fotos/Toucan.jpg.decrypted.1733849032","/Fotos/Toucan.jpg"]]},{"file":"/var/www/html/lib/private/Encryption/DecryptAll.php","line":264,"function":"rename","class":"OC\\Files\\View","type":"->","args":["/xxxxx/files/Fotos/Toucan.jpg.decrypted.1733849032","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Encryption/DecryptAll.php","line":228,"function":"decryptFile","class":"OC\\Encryption\\DecryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Encryption/DecryptAll.php","line":187,"function":"decryptUsersFiles","class":"OC\\Encryption\\DecryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Encryption/DecryptAll.php","line":98,"function":"decryptAllUsersFiles","class":"OC\\Encryption\\DecryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/core/Command/Encryption/DecryptAll.php","line":152,"function":"decryptAll","class":"OC\\Encryption\\DecryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Encryption\\DecryptAll","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Encryption\\DecryptAll"],"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Files/Node/Node.php","Line":114,"CustomMessage":"Exception thrown: OCP\\Files\\NotFoundException"}}

Configuration

Nextcloud


{
    "system": {
        "htaccess.RewriteBase": "\/xxxxx",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "default_language": "de_DE",
        "default_locale": "de",
        "logtimezone": "Europe\/Berlin",
        "lost_password_link": "disabled",
        "skeletondirectory": "\/var\/www\/html\/skeleton",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
         xxxxx
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "27.1.5.1",
        "overwriteprotocol": "https",
        "overwritewebroot": "xxx",
        "overwritehost": "xxxxx",
        "overwrite.cli.url": "https:\/\/xxxxx",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": true,
                "verify_peer": false,
                "verify_peer_name": false
            }
        },
        "maintenance": false,
        "loglevel": 2,
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

Thank you for your help and kind regards…

I hope bumping is allowed on here :sweat_smile:

You’ll likely have a challenging time getting much assistance since not only is v27 end-of-life, but you’re not even running one of the final maintenance releases of 27.1.x.

The problem you’re experiencing appears to be within files_versions. There are a variety of bug fixes and changes that have occurred in that app since 27.1.5.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.