Server: `encryption:encrypt-all` fails with "Nextcloud is in maintenance mode - no app have been loaded"

Created on 21 Mar 2018  路  6Comments  路  Source: nextcloud/server

Steps to reproduce

First check if encryption is enabled.

sudo -u www-data php occ encryption:status                                                                                                                                                                                    
Cannot load Zend OPcache - it was already loaded                                                                                                                                                            
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0                                                                                                                                        
Nextcloud is in maintenance mode - no app have been loaded                                                                                                                                                  

  - enabled: true                                                                                                                                                                                           
  - defaultModule: OC_DEFAULT_MODULE 

Then double check if the default encryption module is set.

# sudo -u www-data php occ encryption:set-default-module OC_DEFAULT_MODULE                                                                                                          
Cannot load Zend OPcache - it was already loaded                                                                                                                              
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0       
"OC_DEFAULT_MODULE"" is already the default module

Then start the encryption.

sudo -u www-data php occ encryption:encrypt-all
Cannot load Zend OPcache - it was already loaded
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
Nextcloud is in maintenance mode - no app have been loaded



You are about to encrypt all files stored in your Nextcloud installation.
Depending on the number of available files, and their size, this may take quite some time.
Please ensure that no user accesses their files during this time!
Note: The encryption module you use determines which files get encrypted.

Do you really want to continue? (y/n) y


  [OC\Encryption\Exceptions\ModuleDoesNotExistsException]  
  Default encryption module not loaded                     


encryption:encrypt-all

Expected behaviour

Due to maintenance mode, which is recommended, the encryption module is not loaded. So encryption is not possible.

Actual behaviour

Nothing happens.

Server configuration

OS: Raspbian GNU/Linux 9 (stretch)
Apache 2.4
MySQL 5.8
PHP 7
Nextcloud 12.0.6

0. Needs triage bug encryption (server-side)

Most helpful comment

Maintenance mode gets enabled automatically when starting the encryption via occ encryption:encrypt-all.

It just doesn't work if it is enabled manually beforehand, so actually just the documentation needs to be adapted.

All 6 comments

cc @nextcloud/encryption

I'm also having an issue with this. Has there been any update

+1

I'm having the same issue

Maintenance mode gets enabled automatically when starting the encryption via occ encryption:encrypt-all.

It just doesn't work if it is enabled manually beforehand, so actually just the documentation needs to be adapted.

Thank you @haeringer you're right.
Just disable maintenance mode before run occ encryption:encrypt-all .

Was this page helpful?
0 / 5 - 0 ratings