Repository navigation
Closed
owncloud/core
#38567Description
Seen with encryption 1.5.0RC1 in owncloud 10.7.0RC1
- enable encryption.
- setup an external SFTP drive and configure it without encryption.
- move 'ownCloud Manual.pdf' into the SFTP folder.
- inspect the contents of the FTP server manually. The pdf is unencrypted. OK
- run
occ encryption:fix-encrypted-version -p SFTP/ownCloud\ Manual.pdf admin
Verifying the content of file /admin/files/SFTP/ownCloud Manual.pdf
Attempting to fix the path: /admin/files/SFTP/ownCloud Manual.pdf
Increment the encrypted version to 2
Increment the encrypted version to 3
Increment the encrypted version to 4
Increment the encrypted version to 5
Increment the encrypted version to 6
- inspect the contents of the FTP server manually. The pdf is still unencrypted. Okayish. (What did it do???)
The amount of output increases on each invocation. The file never changes:
occ encryption:fix-encrypted-version -p SFTP/ownCloud\ Manual.pdf admin
Verifying the content of file /admin/files/SFTP/ownCloud Manual.pdf
Attempting to fix the path: /admin/files/SFTP/ownCloud Manual.pdf
Decrement the encrypted version to 5
Decrement the encrypted version to 4
Decrement the encrypted version to 3
Decrement the encrypted version to 2
Decrement the encrypted version to 1
Increment the encrypted version to 7
Increment the encrypted version to 8
Increment the encrypted version to 9
Increment the encrypted version to 10
Increment the encrypted version to 11
occ encryption:fix-encrypted-version -p SFTP/ownCloud\ Manual.pdf admin
Verifying the content of file /admin/files/SFTP/ownCloud Manual.pdf
Attempting to fix the path: /admin/files/SFTP/ownCloud Manual.pdf
Decrement the encrypted version to 10
Decrement the encrypted version to 9
Decrement the encrypted version to 8
Decrement the encrypted version to 7
Decrement the encrypted version to 6
Decrement the encrypted version to 5
Decrement the encrypted version to 4
Decrement the encrypted version to 3
Decrement the encrypted version to 2
Decrement the encrypted version to 1
Increment the encrypted version to 12
Increment the encrypted version to 13
Increment the encrypted version to 14
Increment the encrypted version to 15
Increment the encrypted version to 16
These operations take progressively longer. Scary. What is it doing?
option -vvv does not reveal anything new.
Expected behaviour: Nothing is done. Just print The file /admin/files/SFTP/ownCloud Manual.pdf is: OK
Metadata
Metadata
Assignees
Labels
No labels
Activity
micbar commentedon Mar 19, 2021
This command is a maintenance command. It is totally unaware of its used context.
Consider it as a tool for ownCloud support. It should be used on a file which encryption is broken.
micbar commentedon Mar 19, 2021
@C0rby @IljaN We need to check if theMOVE operation leaves the DB in an inconsistent state.
@jnweiger same here, please also repeat this test with WND storage.
C0rby commentedon Mar 19, 2021
Setup:
Process
We couldn't reproduce any errors.
micbar commentedon Mar 19, 2021
@C0rby How is the db value from oc_filecache? The
encryptedvalue should be0after the MOVEjnweiger commentedon Mar 19, 2021
I have reproduced a case without a prior MOVE operation and without involving SFTP:
so yes, a MOVE can trigger the situation, but is not necessary.
jnweiger commentedon Mar 19, 2021
(sorry for using the fix tool again. I understand is has no real life usage here. But I hope it points us to the core of the issue.)
jnweiger commentedon Mar 19, 2021
In case of an externl ownCloud storage, I suggest encryption should be default disabled. or even hardcoded disabled.
I feel sorry for the poor users of demo.owncloud.org seeing my "aparently corrupt" jpg files. 😕
C0rby commentedon Mar 19, 2021
Oh right... this wasn't about error while synching but about inconsistent state. The
encryptedvalue was not0. 😞C0rby commentedon Mar 19, 2021
No need to be sorry. I think that's what @micbar is thinking.
encryptedvalue in filecache is not0encryptedvalue is still not0fix-encrypted-versioncommandencrypted != 0but some of those files (in external storage) are not encryptedAnd that could throw off the fix command.
IljaN commentedon Mar 19, 2021
+1, especially because the more common case is that the external storage is used by other clients or applications than ownCloud, or isn't it?
C0rby commentedon Mar 19, 2021
Disabled by default maybe, but hardcoded disabled is not a good idea in my opinion. Wasn't the purpose of the encryption module to be able to store files on (external) storages you don't trust? Hardcoded disabling this would remove that option.
jnweiger commentedon Mar 19, 2021
Encryption is perfectly fine fine for any type of external storage, except for the type "ownCloud", where the files are hosted at another ownCloud instance. Only in this case I'd like to discuss default disable or hard off.
It may lead to very odd situations. Users at the hosting ownCloud instance see these files as corrupt files. A confused admin at the hosting ownCloud instance may even recognize the files as encrypted owncloud files, and try to fix the encryption ... -> Chaos.
jnweiger commentedon Mar 20, 2021
Same problem (and more) also seen on WND -> #257