[Owncloud] Encryption no longer working

Robin Appelman icewind at owncloud.com
Thu Aug 9 01:43:33 UTC 2012


On Wednesday 08 August 2012 07:32:33 niazy at niazyselim.net wrote:
> Hello All,
> 
> I am in the same dilemma as Andreas. I had all my files and my wifes
> files (separate accounts) encrypted in owncloud. Things were working
> well. The server was acting up so I decided to reinstall to a fresh
> Ubunut 12.04LTS. I had my owncloud/data/ on a separate partition on a
> RAID5 disk.
> After resinstall, out of paranoia and to be safe, I copied the data
> first to owncloud/data/ using regular cp command.
> Our passwords are the same. My files are encrypted and I cannot
> decrypted them any more. The encryption.key file is the the original
> one. I wrote a php routine to decrypt the can decrypt the
> encryption.key and I was able to retrieve its salt. For an expirement,
> I encrypted a text file using owncloud and I still cannot decrypt the
> text back. It decrypts in owncloud browser but not using a php
> blowfish routines. I emailed Frank Karlitschek and he was nice enough
> to respond. He said that the salt in the config.conf is used to
> encrypt the password. I looked in the routines and found out that the
> salt is generated in a random fassion. Then we are screwed. I cannot
> believe we encrypt people's data against a random salt and without any
> warning to tell people to copy the salt in a safe place just in
> case????????????
> 
> Anyhelp will be greatly appreciated.
> Niazy

Nothing in config.php is used for encryption, I think the problem is that with 
the old database gone, owncloud no longer knows what files were encrypted.

I made the attacted script which will set the encryption flag for all files that 
would be encrypted using the current settings.
Place the script in your owncloud folder and run it from a browser.

Using this script might mess up your installation and any files uploaded before 
encryption was enabled in the original installation will be unreadable untill 
the values in the database are corrected

 - Robin Appelman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recovery.php
Type: application/x-php
Size: 1082 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20120809/f038c1e5/attachment.bin>


More information about the Owncloud mailing list