Files become corrupt after file name rename (Using Encryption App)
After creating a New Text File, entering text, saving, and then renaming, contents of file become corrupt.
To reproduce in web interface:
- Files screen > New > Text File. Enter file name, my name was (no quotes) "test".
- Open test file, enter text (no quotes) "Hello this is a test."
- Click Save.
- Back on Files screen, hover over file to select Rename.
- Rename file to (no quotes) "testfile".
- Upon reopening file, text is now garbled "cŒþó>ŒTæEŒnó*PID_" (this is a copy / paste from the text).
- Back on Files screen, hover over file to select Rename.
- Rename file to (no quotes) "test".
- Reopen file, text displays as originally entered ("Hello this is a test.")
Win 7 x64 / IIS7 / PHP 5.3.27 OC 5.0.13 / Encryption App 0.4
@schiesbn @ringmaster THX
Random guess for when I get to look at this later: The encryption key for the file isn't renamed when the file is renamed. This would probably be the same for any file thus renamed, not just text files.
@ringmaster Yes, I think your instinct is correct:
- Downloaded 7zip.exe Windows installer.
- Copy / paste this file into OC folder on my PC. File is synced up to OC server.
- On OC web interface, rename to 7zipinstaller.exe
- File on my PC (7zip.exe) is deleted and replaced with server file 7zipinstaller.exe, which is now corrupt.
When renaming file on my PC, cloud copy is renamed and becomes corrupt (verified by downloading via web interface to PC). 7zipinstaller.exe is also corrupt on a second sync PC. File on first PC is okay (as it has not changed on PC).
I tried to reproduce both scenarios and couldn't reproduce it on a GNU/Linux server.
@MrsBJSmegma can you check if the correct encryption keys exists. You need following keys after renaming:
data/<user>/files_encryption/keyfiles/7zipinstaller.exe.key-
The name of the the keys always need to match the current filename.
@ringmaster would be great if you could try to reproduce it on IIS since I can't reproduce it on GNU/Linux.
@schiesbn The .key files in S:\owncloud_data\andy\files-encryption\keyfiles are renamed when files are renamed using the web interface or when renamed and synced via PC. This folder also has a current list of all files (plus 1 extra folder, presumably part of the encryption system).
The .sharekey files in S:\owncloud_data\andy\files-encryption\share-keys do NOT get renamed when files are renamed (files will always have the filename of the file when the file was first created). This folder is also full of files and folders that have been deleted via web interface, but these files still persist. There is also the extra folder (part of encryption system?)
Perhaps a permissions issue in IIS? Will look at that later today.
EDIT: Have given all available permissions to Everyone user group on data volume (Drive S), with no change in OC behavior.
There have been recent fixes to the encryption app. Do you still see this happening in OC 6.0.1 ?
no more response from reporter. this should be fixed