Cannot download Files - possibly encryption problem

expert
encryption
9.0.x
help

#1

Hello,

I tried to update my owncloud 8.2.7 to 9.0.5. But while the db was upgrading my sql server ran out of disk space and the db crashed. I tried than to restore the db with an backup. But i had to realize that i didn't have a full dump.
So i decided to install a new owncloud instance. After installing, i activated encryption and created my users with the same passwords as before. After that i copied the old data path to the new one and started an occ files:scan.
After that i was able to access most of the files. But some files cannot be opened, downloaded or synced. I found out that the download stops at the moment when the original file size (without encryption) has been downloaded.
I already search in oc:filecache for that files. The encryption ist set to 1. And the file is really encrypted. I downloaded it via ftp.

So...has anyone an idea? In owncloud log i found the error Cannot modify header information - headers already sent by ...

Thanks

Matthias


#2

Hi,

are you using external storages? If no try to decrypt your current files (or the backup) like explained:

https://doc.owncloud.org/server/9.0/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands

and disable encryption afterwards:

https://doc.owncloud.org/server/9.0/admin_manual/configuration_files/encryption_configuration.html#disabling-encryption

The encryption app won't protect your data if you're not using an external storage and just brings an additional layer of complexity and issues like you're facing now.


#3

I have already tried to deactivate the encryption. But the problem is still there. And the files still look like they were encrypted.


#4

My suggestion:

Do a backup of your files on client-side and install a fresh copy of ownCloud 9.1.1. Afterwards you can re-import your data without encryption.


#5

This would be the easiest way. But i don't have a copy of all files on clients. Some were only saved in our cloud. I have backups. But all these files are encrypted. Isn't there a way to manually decrypt the files?


#6

Manual decryption of files is possible via the occ command as explained above.

https://doc.owncloud.org/server/9.0/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands


#7

But the occ command doesn't decrypt all files. Some stay crypted without any error.


#8

Hi,

then your files might be lost in this case. Thats why you should always have backups of your files.

Maybe some one else can help here, tagging this as "expert" for now.


#9

OK. In the meantime a found a way to manually decrypt my files. So i believe that the occ tool has bug.


#10

Hi,

if you think that has a bug then please report it:

https://github.com/owncloud/core/issues

It won't get noticed in here and most likely unfixed.


#11

what solution you found to manually decrypt files?


#12

Hi benzarod,

i used this tool to decrypt my files. It is really slow, but does his job.