hi @Mageunic thanks again.
The password change doesn’t work somehow… the weird thing is, that now I can put in whatever I want when sudo mysql -u root -p is asking me for a password. It just accepts anything now, maybe because of the try to change it?
When trying to change it, there just appears the next command line but no output whatsoever.
When restarting I get the same Internal server error because of the change of the database password in the config file.
I tried decrypting my files. I got the error “In Crypt.php line 505: Bad Signature”
Line 505 from “/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php”, is throw new GenericEncryptionException('Bad Signature', $this->l->t('Bad Signature')); inside a if block.
@Mageunic the website is awesome, I changed both the root and user password. But nevertheless the password gets changed in the config file with every reboot. So as a workaround I just used the password it changes to every time, now it works. Maybe I try to look into this particular phenomena later.
Edit:
I also tried to replace the Crypt.php with the old one, and give it the right permission, but it didn’t work. And I also tried to replace the whole directory “/var/www/nextcloud/apps/encryption” give it the right permission, but it also didn’t work.
That’s the log file with the old encryption directory:
[no app in context] Error: OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature at <>
/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php line 480
OCA\Encryption\Crypto\Crypt->checkSignature("*** sensitive parameters replaced ***")
/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php line 429
OCA\Encryption\Crypto\Crypt->symmetricDecryptFileContent("*** sensitive parameter replaced ", " sensitive parameter replaced ***", “AES-256-CTR”, 0)
/var/www/nextcloud/apps/encryption/lib/KeyManager.php line 237
OCA\Encryption\Crypto\Crypt->decryptPrivateKey("*** sensitive parameters replaced ***")
/var/www/nextcloud/apps/encryption/lib/Users/Setup.php line 64
OCA\Encryption\KeyManager->validateMasterKey()
/var/www/nextcloud/apps/encryption/lib/AppInfo/Application.php line 57
OCA\Encryption\Users\Setup->setupSystem()
/var/www/nextcloud/apps/encryption/appinfo/app.php line 38
OCA\Encryption\AppInfo\Application->setUp(OC\Encryption\Manager {})
/var/www/nextcloud/lib/private/legacy/OC_App.php line 303
require_once("/var/www/nextcl … p")
/var/www/nextcloud/lib/private/legacy/OC_App.php line 185
OC_App::requireAppFile(OCA\Encryption\AppInfo\Application {})
/var/www/nextcloud/lib/private/legacy/OC_App.php line 138
OC_App::loadApp(“encryption”)
/var/www/nextcloud/lib/base.php line 979
OC_App::loadApps()
/var/www/nextcloud/index.php line 37
OC::handleRequest()
The log file with the default encryption directory is the exact same, so nothing changes when replacing the encryption directory…
@Mageunic I don’t think that the server encryption still has a legacy encryption module, there was an update once. Anyway I deactivated the encryption in the settings and the app, then enabled it again like you suggested but unfortunately it did not work.
My files were not on legacy anymore I am really sure about it because I disabled the legacy extension while it was still working, and I had to make sure first that there are no files left with the legacy encryption. Thats what ncc encryption:scan:legacy-format was for.
@Mageunic you already helped me a lot. And the main problems are solved. Thank you again. I will try to write a summary soon (: Also I got the most important data synchronized with other devices, so I will put my instance back to work again now. And take care about the rest later.
Thanks again mate, you safed me so much trouble.
look for the database password for ncadmin in /var/www/nextcloud/config/config.php
by the way → make sure the location of your data directory (ncdata) is set right in the config.php (default location of database: /var/www/nextcloud/data)
it asks for a password, you can type anything here, it doesn’t mater, just hit enter.
MariaDB [(none)]> use mysql;
MariaDB [mysql]> ALTER USER 'ncadmin'@'localhost' IDENTIFIED BY 'the_password_from_the_config.php'
MariaDB [mysql]> FLUSH PRIVILEGES;
MariaDB [mysql]> exit
Thats it, your instance should work with all your encrypted files and settings you had before.
@citizenserious I forgot to say that the other installation that will be used to restore the server must be in the same version as the one you want to restore, otherwise you may encounter problems or not be able to access the server.