core icon indicating copy to clipboard operation
core copied to clipboard

Files become corrupt after file name rename (Using Encryption App)

Open MrsBJSmegma opened this issue 13 years ago • 7 comments

After creating a New Text File, entering text, saving, and then renaming, contents of file become corrupt.

To reproduce in web interface:

  1. Files screen > New > Text File. Enter file name, my name was (no quotes) "test".
  2. Open test file, enter text (no quotes) "Hello this is a test."
  3. Click Save.
  4. Back on Files screen, hover over file to select Rename.
  5. Rename file to (no quotes) "testfile".
  6. Upon reopening file, text is now garbled "c‡Œþ‚ó‹>ŒŒTæEŒnó*PID_" (this is a copy / paste from the text).
  7. Back on Files screen, hover over file to select Rename.
  8. Rename file to (no quotes) "test".
  9. 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

MrsBJSmegma avatar Nov 11 '13 22:11 MrsBJSmegma

@schiesbn @ringmaster THX

DeepDiver1975 avatar Nov 11 '13 22:11 DeepDiver1975

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 avatar Nov 11 '13 22:11 ringmaster

@ringmaster Yes, I think your instinct is correct:

  1. Downloaded 7zip.exe Windows installer.
  2. Copy / paste this file into OC folder on my PC. File is synced up to OC server.
  3. On OC web interface, rename to 7zipinstaller.exe
  4. 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).

MrsBJSmegma avatar Nov 11 '13 23:11 MrsBJSmegma

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.

schiessle avatar Nov 12 '13 09:11 schiessle

@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.

MrsBJSmegma avatar Nov 12 '13 12:11 MrsBJSmegma

There have been recent fixes to the encryption app. Do you still see this happening in OC 6.0.1 ?

PVince81 avatar Feb 12 '14 09:02 PVince81

no more response from reporter. this should be fixed

karlitschek avatar Sep 21 '14 16:09 karlitschek