Hello, my Nextcloud installation uses server-side encryption. I am currently trying to restore a file using the encryption recovery tools; here is the link to it: encryption-recovery-tools/server-side-encryption at master · nextcloud/encryption-recovery-tools · GitHub. I have the master key from the file and have recovered the encrypted file, storing everything in the following folder structure.
manuel.mura@RG-KT6QNWJ0W0 nextcloud % tree
.
├── OC_DEFAULT_MODULE
│ ├── master_432db5a7.privateKey
│ ├── master_432db5a7.publicKey
│ ├── pubShare_432db5a7.privateKey
│ └── pubShare_432db5a7.publicKey
└── c3-data
├── cache
├── files
│ └── backup_test
│ └── Digitec_Auftragsbestätigung_120012917.pdf
├── files_encryption
│ └── keys
│ └── backup_test
│ └── Digitec_Auftragsbestätigung_120012917.pdf
│ └── OC_DEFAULT_MODULE
│ └── master_432db5a7.shareKey
└── uploads
I have defined the secret key and the file folder.
config("DATADIRECTORY", "nextcloud");
config("SECRET", "mysecret");
However, when I start the script, I get the following:
php recover.php target
INFO: decrypting private keys...
WARNING: COULD NOT DECRYPT ANY PRIVATE KEY
INFO: preparing sources, this could take a while...
ERROR: /Users/name/test_aws/nextcloud/c3-data/files/backup_test/Digitec_Auftragsbestätigung_120012917.pdf FAILED
ERROR: AN ERROR OCCURED DURING THE DECRYPTION
I don’t understand why this is happening.
Can someone help me?
Best Regards