Recovery method of Decrypt-all command fails with invalid credentials

Steps to reproduce

  1. ssh to owncloud instance
  2. add env variable export OC_RECOVERY_PASSWORD=‘recoverypassword’
  3. set OC_RECOVERY_PASSWORD=‘recoverypassword’
  4. sudo -u daemon php -d memory_limit=-1 /opt/bitnami/owncloud/occ encryption:decrypt-all -m recovery username

Expected behaviour

Tell us what should happen:
Decrypt all files for the specified user

Actual behaviour

Tell us what happens instead:
Fails with error: “In DecryptAll.php line 204: invalid credentials provided”
We ensured that password is correct and correctly resides in environment variables.

Server configuration

Operating system: Debian GNU/Linux 10

Web server:
Server version: Apache/2.4.53 (Unix)
Server built: Mar 14 2022 13:20:59

Database:
MariaDB

PHP version:
v3.4.0

ownCloud version: (see ownCloud admin page)
10.10.0.3

Updated from an older ownCloud or fresh install:
fresh

Where did you install ownCloud from:
Bitnami package

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

<?php
$CONFIG = array (
  'passwordsalt' => '---',
  'secret' => '---',
  'datadirectory' => '/bitnami/owncloud/data',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '10.10.0.3',
  'dbname' => 'bitnami_owncloud',
  'dbhost' => '127.0.0.1:3306',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '---',
  'dbpassword' => '---',
  'allow_user_to_change_mail_address' => '',
  'http.cookie.samesite' => 'None',
  'logtimezone' => 'Europe/Moscow',
  'maintenance' => false,
  'enable_certificate_management' => true,
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/opt/bitnami/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/opt/bitnami/owncloud/apps-external',
      'url' => '/apps-external',
      'writable' => true,
    ),
  ),
  'installed' => true,
  'instanceid' => 'oct9m86qmso2',
  'mail_domain' => '---',
  'mail_from_address' => '---',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => '---',
  'mail_smtpport' => '25',
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'password' => '',
    'dbindex' => 0,
  ),
  'ldapIgnoreNamingRules' => false,
  'openid-connect' =>
  array (
    'auto-provision' =>
    array (
      'enabled' => true,
      'email-claim' => 'email',
      'display-name-claim' => 'name',
    ),
    'mode' => 'userid',
    'search-attribute' => 'preferred_username',
    'provider-url' => '---',
    'client-id' => '---',
    'client-secret' => '---',
    'loginButtonName' => 'SSO',
  ),
  'singleuser' => true,
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '---',
  ),
);


Log in to the web-UI with an administrator account and click on
‘admin’ → ‘Generate Config Report’ → ‘Download ownCloud config report’
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

ATTENTION: Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove all host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.


**List of activated apps:**

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.


**Are you using external storage, if yes which one:** local/smb/sftp/...
no

**Are you using encryption:** yes/no
yes

**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...

#### LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM oc_appconfig WHERE appid = ‘user_ldap’;

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.


### Client configuration
**Browser:**

**Operating system:**

### Logs
#### Web server error log

Insert your webserver log here


#### ownCloud log (data/owncloud.log)

#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) …

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