Repository navigation
Closed
Labels
Milestone
Description
Steps to reproduce
- Take a PROPFIND of
/Documents/from[email protected]before sharing/Documents/Example.odt - Share
Documents/Example.odtwithdemo - Take another PROPFIND of
/Documents/ - Compare etags for
/Documents/ - Compare permissions for
/Documents/Example.odt
Expected behaviour
- the eTag for at least
/Documents/should change after sharing the file - the permissions for
/Documents/Example.odtshould include anSafter sharing the file
Actual behaviour
- no eTags change
- no permissions change
You can see that the share was actually added by the addition of <oc:share-types> in the logs below.
Server configuration
demo.owncloud.com as of March 4th, 2019
ownCloud version: 10.1.0.4
Logs
PROPFIND of /Documents/ before sharing /Documents/Example.odt:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/files/admin/Documents/</d:href>
<d:propstat>
<d:prop>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:getlastmodified>Mon, 04 Mar 2019 10:23:19 GMT</d:getlastmodified>
<d:getetag>"5c7cfc97c22d7"</d:getetag>
<oc:id>00000091ocs7se16w8jy</oc:id>
<oc:size>36227</oc:size>
<oc:permissions>RDNVCK</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:share-types/>
<oc:owner-display-name>admin</oc:owner-display-name>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:getcontentlength/>
<d:getcontenttype/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/dav/files/admin/Documents/Example.odt</d:href>
<d:propstat>
<d:prop>
<d:resourcetype/>
<d:getlastmodified>Mon, 04 Mar 2019 10:23:20 GMT</d:getlastmodified>
<d:getcontentlength>36227</d:getcontentlength>
<d:getcontenttype>application/vnd.oasis.opendocument.text</d:getcontenttype>
<d:getetag>"341404dd5c75a411d5873392647683f7"</d:getetag>
<oc:id>00000092ocs7se16w8jy</oc:id>
<oc:size>36227</oc:size>
<oc:permissions>RDNVW</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:share-types/>
<oc:owner-display-name>admin</oc:owner-display-name>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
PROPFIND of /Documents/ after sharing /Documents/Example.odt:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/files/admin/Documents/</d:href>
<d:propstat>
<d:prop>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:getlastmodified>Mon, 04 Mar 2019 10:23:19 GMT</d:getlastmodified>
<d:getetag>"5c7cfc97c22d7"</d:getetag>
<oc:id>00000091ocs7se16w8jy</oc:id>
<oc:size>36227</oc:size>
<oc:permissions>RDNVCK</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:share-types/>
<oc:owner-display-name>admin</oc:owner-display-name>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:getcontentlength/>
<d:getcontenttype/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/dav/files/admin/Documents/Example.odt</d:href>
<d:propstat>
<d:prop>
<d:resourcetype/>
<d:getlastmodified>Mon, 04 Mar 2019 10:23:20 GMT</d:getlastmodified>
<d:getcontentlength>36227</d:getcontentlength>
<d:getcontenttype>application/vnd.oasis.opendocument.text</d:getcontenttype>
<d:getetag>"341404dd5c75a411d5873392647683f7"</d:getetag>
<oc:id>00000092ocs7se16w8jy</oc:id>
<oc:size>36227</oc:size>
<oc:permissions>RDNVW</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:share-types>
<oc:share-type>0</oc:share-type>
</oc:share-types>
<oc:owner-display-name>admin</oc:owner-display-name>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
Activity
ownclouders commentedon Mar 4, 2019
GitMate.io thinks possibly related issues are #22739 (Sharing permission issue), #4120 (Permission issues in shared folder), #16587 (Changing share permissions should trigger an etag change), #2838 (Shared Permissions not with PC Client), and #4520 (Sharing folders often does not give proper permissions).
PVince81 commentedon Mar 4, 2019
I'm suspecting a regression here, as in the past we did decide to have etag propagation for any changes related to shares and their permissions: #16587
need some digging in the code and the past, bisecting, etc...
PVince81 commentedon Mar 4, 2019
this might also be two separate issues.
I'm not 100% sure about etag propagation for creation.
Still, the second part is odd: the shared folder should have the "S" flag set.
felix-schwarz commentedon Mar 4, 2019
One thing that would be important for clients to be able to reliably pick up updates: the etag should change for every change to the sharing information.
If etag updates were only triggered indirectly by a change of permissions, clients would only get a change indication after the first share being added to an item - and after the last share being removed from an item, f.ex.:
SpermissionPROPFINDon and requests all shares for items in the enclosing folderSpermission already there, permissions wouldn't change)PROPFINDnor re-request all shares for items in the enclosing folderThe same issue would arise if the etag isn't updated when a different type of share is added to an item that's already shared.
oc:share-typeswould change in thePROPFINDresponse for the item, but without a hint (by means of an updatedetag), the client would not know it should look for changes like this. In case the client represents different types of shares differently in the UI, the UI could then show incorrect/outdated information.PVince81 commentedon Mar 4, 2019
@davitol can you confirm this and compare with 8.2.11 and later ?
The original PR says this was fixed in 8.2 so I expect that maybe it worked at some point then stopped working.
davitol commentedon Mar 11, 2019
Tested in 8.2.6 and the issue is reproducible:
1 - Take a PROPFIND of /Documents/ from [email protected] before sharing /Documents/Example.odt
2 - Share Documents/Example.txt with demo
3 - Take another PROPFIND of /Documents/
So the etags are not modified after the sharing in 8.2.6. I will test now in other versions
davitol commentedon Mar 11, 2019
Also tested in oC 9.0.11.2. Same behavior. The issue happens
PVince81 commentedon Mar 12, 2019
ok thanks, it's as if this never worked properly before... will schedule some time to look at this
PVince81 commentedon Mar 19, 2019
not a regression then, this never worked correctly
DeepDiver1975 commentedon Mar 19, 2019
One Idea would be to use etag and ctag properly ......
stale commentedon Sep 20, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.