Skip to content

shared folder synchronization fails because of one file #17444

Closed

Description

@atroxix

One shared file causes interruption of the whole synchronization progress.
Error in client: 1.8.3 (OpenSUSE)
07/07/2015 16:35:57 security/myfile.xlsx ownCloudShared Connection closed 14 KiB

Error in server: 8.0.2 (Debian)

{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Read lock requested for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-07-07T16:34
:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"PASS: Acquired read lock for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-07-07T16:34:
52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-
07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-
07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-
07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-
07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Read lock requested for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/Documents\/security\/myfile.xlsx\/fileKey","level":
0,"time":"2015-07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"PASS: Acquired read lock for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/Documents\/security\/myfile.xlsx\/fileKey","level":0
,"time":"2015-07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/Documents\/security\/myfile.xlsx\/fileKey","level":0,"time":"2015-07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Releasing locks on \/var\/ownclouddata\/myuser\/files_encryption\/keys\/Documents\/security\/myfile.xlsx\/fileKey","level":0,"time":"2015-07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"INFO: Released lock handle Resource id #605 on \/var\/ownclouddata\/myuser\/files_encryption\/keys\/Documents\/security\/myfile.xlsx\/fileKey","level":0,"time":"2015-07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
{"reqId":"65cfdcb383ac5bfc66cf24cbec3b0b9a","remoteAddr":"client-ip","app":"lock","message":"FREE: Released locks on \/var\/ownclouddata\/myuser\/files_encryption\/keys\/Documents\/security\/myfile.xlsx\/fileKey","level":0,"time":"2015-07-07T16:34:52+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}

Activity

  1. PVince81 commented on Jul 7, 2015

    @PVince81
    Contributor

    I hope it's the exact same issue, because I observed some discrepancies between my steps and your statements in the other ticket. Symptoms were the same.

    We'll see. Here were my steps: #15856 (comment)

  2. PVince81 commented on Jul 7, 2015

    @PVince81
    Contributor

    By the way, you might want to update to 8.0.5.

  3. PVince81 commented on Sep 24, 2015

    @PVince81
    Contributor

    Any more luck with 8.0.6 or 8.1.3 ?

  4. atroxix commented on Sep 29, 2015

    @atroxix
    Author

    We have 8.1.3 now, but the error remains.

    Client: 2.0.1 (64-bit Fedora)
    Server: 8.1.3 (Debian 8.2)

    Logs from server:

    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Read lock requested for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"PASS: Acquired read lock for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files\/Documents\/security\/myfile.xlsx","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Read lock requested for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/files\/Documents\/security\/myfile.xlsx\/OC_DEFAULT_MODULE\/fileKey","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"PASS: Acquired read lock for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/files\/Documents\/security\/myfile.xlsx\/OC_DEFAULT_MODULE\/fileKey","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/files\/Documents\/security\/myfile.xlsx\/OC_DEFAULT_MODULE\/fileKey","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"files_locking","message":"INFO: Incrementing lock type 1 count for \/var\/ownclouddata\/myuser\/files_encryption\/keys\/files\/Documents\/security\/myfile.xlsx\/OC_DEFAULT_MODULE\/fileKey","level":0,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"PHP","message":"fread(): Length parameter must be greater than 0 at \/var\/www\/owncloud\/3rdparty\/icewind\/streams\/src\/Wrapper.php#67","level":3,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"no app in context","message":"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.","level":3,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    {"reqId":"b3Q4Wl9zrId3zchLCluh","remoteAddr":"client-ip","app":"webdav","message":"Exception: {\"Message\":\"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/files\\\/stream\\\/encryption.php(443): OCA\\\\Encryption\\\\Crypto\\\\Encryption->decrypt('MsXDyZBDUssNdvx...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/files\\\/stream\\\/encryption.php(282): OC\\\\Files\\\\Stream\\\\Encryption->readCache()\\n#2 [internal function]: OC\\\\Files\\\\Stream\\\\Encryption->stream_read(8192)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/http\\\/lib\\\/Sapi.php(70): file_put_contents('php:\\\/\\\/output', Resource id #552)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\HTTP\\\\Sapi::sendResponse(Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(83): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/owncloud\\\/remote.php(132): require_once('\\\/var\\\/www\\\/ownclo...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/encryption\\\/lib\\\/crypto\\\/encryption.php\",\"Line\":289}","level":4,"time":"2015-09-29T16:05:06+03:00","method":"GET","url":"\/remote.php\/webdav\/Shared\/security\/myfile.xlsx"}
    

    We have tried removing the share and re-adding it. I also noticed that for some files in that folder "Share" link is not shown - only "Download" and "Versions".

    Lines concerning this files from client log:

    09-29 16:05:05:818 0x2c2bed0 csync_walker: file: ownclouds://myowncloudserver/remote.php/webdav/Shared/security/myfile.xlsx [file_id=00013177oc99fc632de0 size=14059]
    09-29 16:05:05:818 0x2c2bed0 _csync_detect_update: file: security/myfile.xlsx, instruction: INSTRUCTION_NEW <<=
    09-29 16:05:05:931 0x1bddbd0 _csync_merge_algorithm_visitor: INSTRUCTION_NEW      server file: security/myfile.xlsx
    09-29 16:05:05:939 0x1bddbd0 socketapi.cpp:327 SocketApi:  Sending message:  "STATUS:SYNC:/home/kasutaja/ownCloudShared/security/myfile.xlsx"
    09-29 16:05:05:947 0x1bddbd0 propagatedownload.cpp:311 virtual void OCC::PropagateDownloadFileQNAM::start() "security/myfile.xlsx" 0
    09-29 16:05:05:948 0x1bddbd0 syncjournaldb.cpp:900 "INSERT OR REPLACE INTO downloadinfo (path, tmpfile, etag, errorcount) VALUES ( ?1 , ?2, ?3, ?4 )" "security/myfile.xlsx" "security/.myfile.xlsx.~5838c5d1" "54080e5f92651" 0
    09-29 16:05:05:950 0x1bddbd0 abstractnetworkjob.cpp:228 !!! OCC::GETFileJob created for "https://myowncloudserver" + "Shared/security/myfile.xlsx"
    09-29 16:05:05:963 0x1bddbd0 folderwatcher.cpp:90 * Discarded as is hidden! "/home/kasutaja/ownCloudShared/security/.myfile.xlsx.~5838c5d1"
    09-29 16:06:11:258 0x1bddbd0 propagatedownload.cpp:404 void OCC::PropagateDownloadFileQNAM::slotGetFinished()  QUrl( "https://myowncloudserver/remote.php/webdav/Shared/security/myfile.xlsx" )  FINISHED WITH STATUS 2 "Connection closed" 0 0 14059 0 "" "14059"
    09-29 16:06:11:259 0x1bddbd0 syncjournaldb.cpp:911 "DELETE FROM downloadinfo WHERE path=?1" "security/myfile.xlsx"
    09-29 16:06:11:260 0x1bddbd0 syncengine.cpp:864 void OCC::SyncEngine::slotItemCompleted(const OCC::SyncFileItem&, const OCC::PropagatorJob&) "security/myfile.xlsx" INSTRUCTION_NEW 1 "Connection closed"
    09-29 16:06:11:262 0x1bddbd0 socketapi.cpp:327 SocketApi:  Sending message:  "STATUS:ERROR:/home/kasutaja/ownCloudShared/security/myfile.xlsx"
    09-29 16:06:11:283 0x1bddbd0 folderwatcher.cpp:90 * Discarded as is hidden! "/home/kasutaja/ownCloudShared/security/.myfile.xlsx.~5838c5d1"
    09-29 16:06:11:310 0x1bddbd0 folder.cpp:972   ** error Strings:  ("Connection closed", "security/myfile.xlsx: Connection closed")
    

    I see there is some ".myfile.xlsx....", but in fact I don't have such file not in the original computer nor in OwnCloud folder server-side.

  5. kalletabur commented on Oct 9, 2015

    @kalletabur

    Any updates on this?

  6. PVince81 commented on Oct 9, 2015

    @PVince81
    Contributor

    I see Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you. I'd expect that if the owner shares the file again (or the containing folder), the target user should get access again. @atroxix said it didn't work.

    Something to check: look at the folder "data/$SHARE_OWNER/files_encryption/.../security/myfile.xls" and see if the list of "*.shareKey" files contains one for the recipient user.

  7. PVince81 commented on Oct 9, 2015

    @PVince81
    Contributor

    @schiesbn

  8. kalletabur commented on Oct 12, 2015

    @kalletabur

    There is no .shareKey file(s) in atroxix folder, only fileKey.

    But there is actually 2 folders called /myfile.xls/ under user/files_encryption/keys folder
    One is located user/files_encryption/keys/files/SeveralFolders/myfile.xls/ and it's content is folder OC_DEFAULT_MODULE/fileKey
    the other is located at user/files_encryption/keys/SeveralFolders/myfile.xls/ and is empty.

    Do you know why is that? Owncloud manual (where keys stored) doesn't say anything about sorting keyfile folder structure under "files" folder

  9. kalletabur commented on Oct 14, 2015

    @kalletabur

    Any thoughts?

  10. PVince81 commented on Oct 14, 2015

    @PVince81
    Contributor

    The "Length parameter" issue was reported here #18402 but without outcome. Just for reference.

    You could try disabling the "file_locking" app and see if it helps.

  11. PVince81 commented on Oct 14, 2015

    @PVince81
    Contributor

    @schiesbn please advise

  12. kalletabur commented on Nov 24, 2015

    @kalletabur

    We tried disabling file_locking but this didn't fix this.
    Has @schiesbn investigated this issue?

  13. 12 remaining items

  14. PVince81 commented on Apr 18, 2016

    @PVince81
    Contributor
  15. kalletabur commented on Apr 18, 2016

    @kalletabur

    Before this issue arise we had only one migration that has migration backups. Time between these (migration to this issue) was ~3 months.
    In this /encryption_migration_backup_date_time/.. folder there is one file
    myfile.xlsx.key
    and there is no difference between this file and
    user/files_encryption/keys/files/SeveralFolders/myfile.xls/OC_DEFAULT_MODULE/fileKey

    No share keys about that (myfile.xlsx.key) file on server.

    And migrations so far have been successful.

  16. modified the milestones: , on Apr 19, 2016
  17. modified the milestones: 8.1.8, on May 17, 2016
  18. PVince81 commented on Jun 15, 2016

    @PVince81
    Contributor

    If the file "myfile.xlsx" has no share keys, then encryption will not work for that file.

  19. modified the milestones: 8.1.10, 8.1.9 on Jul 18, 2016
  20. PVince81 commented on Sep 21, 2016

    @PVince81
    Contributor

    Without keys this file will not be restore-able. Not sure why the key would disappear completely from the server and not even be found in backup folders. It is likely that this was caused by older encryption bugs.

    I'm closing this now. If you experience further issues with more recent OC versions, feel free to reopen.

  21. lock commented on Aug 3, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  22. locked as resolved and limited conversation to collaborators on Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions