After enabling encryption and running 'encrypt-all', the commands starts encrypting files, but then encounters a broken remote, federated share under a user, cannot access it, throws error and won't progress to other files or users.
I've tried it first with master-key encryption, then turned encryption off and tried it again with user certificate encryption - the error is the same:
Start to encrypt users files
----------------------------
encrypt files for user myuser (2 of 4): /myuser/files/remoteshare/myfile.pdf
[->--------------------------]
In DAV.php line 858:
Sabre\HTTP\ClientHttpException:Forbidden
encryption:encrypt-all
Updated to a major version (ex. 22.2.3 to 23.0.1)
{
"system": {
"apps_paths": [
{
"path": "\/usr\/local\/www\/nextcloud\/apps",
"url": "\/apps",
"writable": true
},
{
"path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
"url": "\/apps-pkg",
"writable": false
}
],
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"memcache.local": "\\OC\\Memcache\\APCu",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"..."
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "26.0.0.11",
"overwrite.cli.url": "https:\/\/...",
"htaccess.RewriteBase": "\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"user_backends": [
{
"class": "\\OCA\\UserExternal\\IMAP",
"arguments": [
"127.0.0.1",
143,
null,
"...",
true,
true
]
}
],
"maintenance": false,
"default_phone_region": "EE",
"theme": "",
"loglevel": 0,
"app_install_overwrite": [
"user_external"
]
}
}
{"reqId":"bS3ljfBSxaZEuA8SD7jO","level":0,"time":"2023-04-04T05:41:35+00:00","remoteAddr":"","user":"--","app":"files_external","method":"","url":"--","message":"Forbidden","userAgent":"--","version":"26.0.0.11","exception":{"Exception":"Sabre\\HTTP\\ClientHttpException","Message":"Forbidden","Code":403,"Trace":[{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Client.php","line":367,"function":"send","class":"Sabre\\HTTP\\Client","type":"->","args":[["Sabre\\HTTP\\Request"]]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/DAV.php","line":568,"function":"request","class":"Sabre\\DAV\\Client","type":"->","args":["COPY","https://external-nextcloud/public.php/webdav/myfile.pdf",null,["https://external-nextcloud/public.php/webdav/myfile.pdf.encrypted.1680586894"]]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":287,"function":"copy","class":"OC\\Files\\Storage\\DAV","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php","line":304,"function":"copy","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":287,"function":"copy","class":"OC\\Files\\Storage\\Wrapper\\Availability","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/View.php","line":936,"function":"copy","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":305,"function":"copy","class":"OC\\Files\\View","type":"->","args":["*** sensitive parameters replaced ***","/myuser/files/remoteshare/myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":278,"function":"encryptFile","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":226,"function":"encryptUsersFiles","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":172,"function":"encryptAllUsersFiles","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/Encryption.php","line":533,"function":"encryptAll","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/core/Command/Encryption/EncryptAll.php","line":116,"function":"encryptAll","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Encryption\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Encryption\\EncryptAll"],"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/occ","line":11,"args":["/usr/local/www/nextcloud/console.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/3rdparty/sabre/http/lib/Client.php","Line":163,"message":"Forbidden","exception":{},"CustomMessage":"Forbidden"}}
Bug description
After enabling encryption and running 'encrypt-all', the commands starts encrypting files, but then encounters a broken remote, federated share under a user, cannot access it, throws error and won't progress to other files or users.
I've tried it first with master-key encryption, then turned encryption off and tried it again with user certificate encryption - the error is the same:
Steps to reproduce
Expected behavior
I'd expect the encrypt-all to progress to other files and users
Installation method
Other Community project
Nextcloud Server version
26
Operating system
Other
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
{ "system": { "apps_paths": [ { "path": "\/usr\/local\/www\/nextcloud\/apps", "url": "\/apps", "writable": true }, { "path": "\/usr\/local\/www\/nextcloud\/apps-pkg", "url": "\/apps-pkg", "writable": false } ], "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "memcache.local": "\\OC\\Memcache\\APCu", "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "..." ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "26.0.0.11", "overwrite.cli.url": "https:\/\/...", "htaccess.RewriteBase": "\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_sendmailmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "user_backends": [ { "class": "\\OCA\\UserExternal\\IMAP", "arguments": [ "127.0.0.1", 143, null, "...", true, true ] } ], "maintenance": false, "default_phone_region": "EE", "theme": "", "loglevel": 0, "app_install_overwrite": [ "user_external" ] } }List of activated Apps
Nextcloud Signing status
Nextcloud Logs
{"reqId":"bS3ljfBSxaZEuA8SD7jO","level":0,"time":"2023-04-04T05:41:35+00:00","remoteAddr":"","user":"--","app":"files_external","method":"","url":"--","message":"Forbidden","userAgent":"--","version":"26.0.0.11","exception":{"Exception":"Sabre\\HTTP\\ClientHttpException","Message":"Forbidden","Code":403,"Trace":[{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Client.php","line":367,"function":"send","class":"Sabre\\HTTP\\Client","type":"->","args":[["Sabre\\HTTP\\Request"]]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/DAV.php","line":568,"function":"request","class":"Sabre\\DAV\\Client","type":"->","args":["COPY","https://external-nextcloud/public.php/webdav/myfile.pdf",null,["https://external-nextcloud/public.php/webdav/myfile.pdf.encrypted.1680586894"]]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":287,"function":"copy","class":"OC\\Files\\Storage\\DAV","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php","line":304,"function":"copy","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":287,"function":"copy","class":"OC\\Files\\Storage\\Wrapper\\Availability","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/View.php","line":936,"function":"copy","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["myfile.pdf","myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":305,"function":"copy","class":"OC\\Files\\View","type":"->","args":["*** sensitive parameters replaced ***","/myuser/files/remoteshare/myfile.pdf.encrypted.1680586894"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":278,"function":"encryptFile","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":226,"function":"encryptUsersFiles","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/EncryptAll.php","line":172,"function":"encryptAllUsersFiles","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/apps-pkg/encryption/lib/Crypto/Encryption.php","line":533,"function":"encryptAll","class":"OCA\\Encryption\\Crypto\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/core/Command/Encryption/EncryptAll.php","line":116,"function":"encryptAll","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Encryption\\EncryptAll","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Encryption\\EncryptAll"],"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/occ","line":11,"args":["/usr/local/www/nextcloud/console.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/3rdparty/sabre/http/lib/Client.php","Line":163,"message":"Forbidden","exception":{},"CustomMessage":"Forbidden"}}Additional info
No response