Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decrypt-all command fails to decrypt files when user specific key is enabled in the encryption #29081

Closed
sharidas opened this issue Sep 22, 2017 · 5 comments

Comments

@sharidas
Copy link
Contributor

Steps to reproduce

  1. Checkout the master branch of core. Checkout the branch withencryptionwrapper-recreate-master for encryption app. We may have to merge the changes to the encryption, hence I would prefer this branch of encryption.
  2. Now run the command as shown in the console/terminal: rm -fr data config/config.php; ./occ maintenance:install --admin-user "admin" --admin-pass "admin"; ./occ app:enable encryption; ./occ encryption:enable; ./occ encryption:select-encryption-type user-keys -y
  3. Login to the UI as admin user. And navigate to the settings page.
  4. Navigate to Admin -> Encryption
  5. Set the recovery key password
  6. Now try to run the decryptall command. It doesn't decrypt the files under the admin user. Below are the logs:
Cannot load Xdebug - it was already loaded
Disable server side encryption... done.


You are about to start to decrypt all files stored in your ownCloud.
It will depend on the encryption module and your setup if this is possible.
Depending on the number and size of your files this can take some time
Please make sure that no user access his files during this process!

Do you really want to continue? (y/n) y
prepare encryption modules...

Prepare "Default encryption module"

You can only decrypt the files of all users if the
recovery key is enabled by the admin and activated by the users.

Please enter the recovery key password: 
 done.


 Fetch list of users... finished 
 [============================]


 starting to decrypt files... finished 
 [============================]


Files for following users couldn't be decrypted, 
maybe the user is not set up in a way that supports this operation: 
    admin

sujith@sujith-Inspiron-5567 ~/test/owncloud $```

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead

### Server configuration
**Operating system**:

**Web server:**
apache

**Database:**
sqlite

**PHP version:**
7.0.22

**ownCloud version:** (see ownCloud admin page)
master branch

**Updated from an older ownCloud or fresh install:**

**Where did you install ownCloud from:**

**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.



**The content of config/config.php:**

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.

`Enabled:
  - activity: 2.3.4
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.1
  - encryption: 1.3.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_sharing: 0.10.1
  - files_texteditor: 2.2
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.1.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
Disabled:
  - customgroups
  - files_antivirus
  - guests
  - impersonate
  - multidirtest
  - password_policy
  - testing
  - theme-example
  - user_external
`

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

**Are you using encryption:** 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:**
Chrome

**Operating system:**
Linux Mint 18.2 Sonya

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

Insert your webserver log here


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

Insert your ownCloud log here


#### Browser log

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

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

@sharidas sharidas self-assigned this Sep 22, 2017
@sharidas sharidas added this to the development milestone Sep 22, 2017
@sharidas sharidas added Type:Bug p3-medium Normal priority labels Sep 22, 2017
@PVince81
Copy link
Contributor

is this only on master or also affects 10.0.3 ?

@PVince81
Copy link
Contributor

PR here #29072

@sharidas
Copy link
Contributor Author

It doesn't work with 10.0.3

@PVince81
Copy link
Contributor

you mean, didn't before your PR.

PR #29189 merged, closing

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants