{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/20769","labels_url":"https://api.github.com/repos/owncloud/core/issues/20769/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/20769/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/20769/events","html_url":"https://github.com/owncloud/core/issues/20769","id":119079082,"number":20769,"title":"Empty etag after moving shared file into a commonly received share","user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/feature:sharing","name":"feature:sharing","color":"d4c5f9"},{"url":"https://api.github.com/repos/owncloud/core/labels/regression","name":"regression","color":"e11d21"},{"url":"https://api.github.com/repos/owncloud/core/labels/sev1-critical","name":"sev1-critical","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"rullzer","id":45821,"avatar_url":"https://avatars.githubusercontent.com/u/45821?v=3","gravatar_id":"","url":"https://api.github.com/users/rullzer","html_url":"https://github.com/rullzer","followers_url":"https://api.github.com/users/rullzer/followers","following_url":"https://api.github.com/users/rullzer/following{/other_user}","gists_url":"https://api.github.com/users/rullzer/gists{/gist_id}","starred_url":"https://api.github.com/users/rullzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rullzer/subscriptions","organizations_url":"https://api.github.com/users/rullzer/orgs","repos_url":"https://api.github.com/users/rullzer/repos","events_url":"https://api.github.com/users/rullzer/events{/privacy}","received_events_url":"https://api.github.com/users/rullzer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/63","html_url":"https://github.com/owncloud/core/milestones/8.2.2-current-maintenance","labels_url":"https://api.github.com/repos/owncloud/core/milestones/63/labels","id":1367142,"number":63,"title":"8.2.2-current-maintenance","description":null,"creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":18,"state":"open","created_at":"2015-10-20T21:23:16Z","updated_at":"2015-12-03T11:02:23Z","due_on":"2015-12-22T04:00:00Z","closed_at":null},"comments":15,"created_at":"2015-11-26T16:52:52Z","updated_at":"2015-12-03T15:52:27Z","closed_at":null,"body":"### Steps to reproduce\r\n1. Setup v8.2.1 with \"root\" as the admin\r\n1. Create two users \"user1\" and \"user2\"\r\n1. Add \"root\", \"user1\" and \"user2\" into a new group \"users\"\r\n1. Login as \"root\"\r\n1. Create a folder \"common/sub\"\r\n1. Share \"common\" with \"users\"\r\n1. Login as \"user1\"\r\n1. Create a non-empty text file \"test.txt\" with some contents using the text editor\r\n1. Share \"test.txt\" with \"user2\"\r\n1. Login as \"user1\" again\r\n1. In the web UI, move \"test.txt\" into \"common\"\r\n1. Then move \"test.txt\" into \"common/sub\"\r\n1. View the text file: contents still exist\r\n1. Check the database entry for test.txt\r\n1. Login as \"user2\"\r\n1. Check the database entry for test.txt\r\n1. View or download the received file share still in the root \"/test.txt\"\r\n\r\n### Expected result\r\nFile can be downloaded and synced.\r\n\r\n### Actual result\r\nFile is broken and empty when opened as receiver.\r\nBefore the last login as \"user2\" the etag still exists in the database.\r\nAs soon as \"user2\" logs in, the etag becomes NULL:\r\n```\r\nMariaDB [owncloud]> select * from oc_filecache where path like '%test%';\r\n+--------+---------+---------------------------+----------------------------------+--------+----------+----------+----------+------+------------+---------------+-----------+------------------+------+-------------+\r\n| fileid | storage | path                      | path_hash                        | parent | name     | mimetype | mimepart | size | mtime      | storage_mtime | encrypted | unencrypted_size | etag | permissions |\r\n+--------+---------+---------------------------+----------------------------------+--------+----------+----------+----------+------+------------+---------------+-----------+------------------+------+-------------+\r\n|     19 |       1 | files/common/sub/test.txt | 9fa03663cc736121e08e4f487f0d3bec |     10 | test.txt |        7 |        7 |    0 | 1448556624 |    1448556624 |         0 |                0 | NULL |          23 |\r\n+--------+---------+---------------------------+----------------------------------+--------+----------+----------+----------+------+------------+---------------+-----------+------------------+------+-------------+\r\n```\r\n\r\nThis might be triggered by the share grouping logic ?\r\n\r\nAlso note that if instead of \"common/sub\" you only use \"common\", the etag stays intact but the file is still broken, and after a few file manipulations the etag becomes NULL too.\r\n\r\nAnd, if as \"user2\" you move \"test.txt\" in a local non-shared subfolder, POOF the file vanishes!\r\n\r\n### Versions\r\nObserved in v8.2.0 and v8.2.1\r\n\r\n@rullzer @schiesbn \r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/161685370","html_url":"https://github.com/owncloud/core/issues/20769#issuecomment-161685370","issue_url":"https://api.github.com/repos/owncloud/core/issues/20769","id":161685370,"user":{"login":"rullzer","id":45821,"avatar_url":"https://avatars.githubusercontent.com/u/45821?v=3","gravatar_id":"","url":"https://api.github.com/users/rullzer","html_url":"https://github.com/rullzer","followers_url":"https://api.github.com/users/rullzer/followers","following_url":"https://api.github.com/users/rullzer/following{/other_user}","gists_url":"https://api.github.com/users/rullzer/gists{/gist_id}","starred_url":"https://api.github.com/users/rullzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rullzer/subscriptions","organizations_url":"https://api.github.com/users/rullzer/orgs","repos_url":"https://api.github.com/users/rullzer/repos","events_url":"https://api.github.com/users/rullzer/events{/privacy}","received_events_url":"https://api.github.com/users/rullzer/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T15:52:27Z","updated_at":"2015-12-03T15:52:27Z","body":"@PVince81 you mean listen to the rename hook and set the parent correctly?"}}