Repository navigation
Closed
Labels
Interaction:Needs-helpAsking some hints to engineering when the issue can't be reproducedType:Discussion
Description
Sharing "seems" to work as expected, but resharing a received share does not work in OCIS. This is because the share does not exist for the receiver even if the response and the status code look good to sharer after sharing.
In OC10:
- Create users:
Alice,BrianandCarol - User
Alicecreates a folderTMP - User
Aliceshares folderTMPwith userBrian:
curl -u alice:1234 -X POST "http://172.17.0.1/oc/ocs/v1.php/apps/files_sharing/api/v1/shares" -H "OCS_APIREQUEST: true" -d path=TMP -d shareType=0 -d shareWith=brian | xmllint --format -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1086 100 1050 100 36 6562 225 --:--:-- --:--:-- --:--:-- 6787
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message/>
<totalitems/>
<itemsperpage/>
</meta>
<data>
<id>33</id>
<share_type>0</share_type>
<uid_owner>alice</uid_owner>
<displayname_owner>alice</displayname_owner>
<permissions>31</permissions>
<stime>1591159503</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>alice</uid_file_owner>
<displayname_file_owner>alice</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<path>/TMP</path>
<item_type>folder</item_type>
<mimetype>httpd/unix-directory</mimetype>
<storage_id>home::alice</storage_id>
<storage>48</storage>
<item_source>2147484562</item_source>
<file_source>2147484562</file_source>
<file_parent>2147484449</file_parent>
<file_target>/TMP</file_target>
<share_with>brian</share_with>
<share_with_displayname>brian</share_with_displayname>
<share_with_additional_info/>
<mail_send>0</mail_send>
<attributes/>
</data>
</ocs>
- And the response about the shared data is:
curl -u alice:1234 -X GET "http://172.17.0.1/oc/ocs/v1.php/apps/files_sharing/api/v1/shares?path=TMP" -H "OCS_APIREQUEST: true"
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message/>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<element>
<id>33</id>
<share_type>0</share_type>
<uid_owner>alice</uid_owner>
<displayname_owner>alice</displayname_owner>
<permissions>31</permissions>
<stime>1591159503</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>alice</uid_file_owner>
<displayname_file_owner>alice</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<path>/TMP</path>
<item_type>folder</item_type>
<mimetype>httpd/unix-directory</mimetype>
<storage_id>home::alice</storage_id>
<storage>48</storage>
<item_source>2147484562</item_source>
<file_source>2147484562</file_source>
<file_parent>2147484449</file_parent>
<file_target>/TMP</file_target>
<share_with>brian</share_with>
<share_with_displayname>brian</share_with_displayname>
<share_with_additional_info/>
<mail_send>0</mail_send>
<attributes/>
</element>
</data>
</ocs>
- User
Brianchecks for the presence of received shareTMP:
curl -u brian:12345 -X PROPFIND http://172.17.0.1/oc/remote.php/dav/files/brian/TMP -v | xmllint --format -
<?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>/oc/remote.php/dav/files/brian/TMP/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Mon, 08 Jun 2020 09:51:42 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>0</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"5ede0a2ed216b"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
- And user
Brianshares received shareTMPwith userCarol:
curl -u brian:12345 -X POST "http://172.17.0.1/oc/ocs/v1.php/apps/files_sharing/api/v1/shares" -H "OCS_APIREQUEST: true" -d path=TMP -d shareType=0 -d shareWith=carol | xmllint --format -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1087 100 1051 100 36 290 9 0:00:04 0:00:03 0:00:01 300
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message/>
<totalitems/>
<itemsperpage/>
</meta>
<data>
<id>34</id>
<share_type>0</share_type>
<uid_owner>brian</uid_owner>
<displayname_owner>brian</displayname_owner>
<permissions>31</permissions>
<stime>1591159762</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>alice</uid_file_owner>
<displayname_file_owner>alice</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<path>/TMP</path>
<item_type>folder</item_type>
<mimetype>httpd/unix-directory</mimetype>
<storage_id>shared::/TMP</storage_id>
<storage>48</storage>
<item_source>2147484562</item_source>
<file_source>2147484562</file_source>
<file_parent>2147484565</file_parent>
<file_target>/TMP</file_target>
<share_with>carol</share_with>
<share_with_displayname>carol</share_with_displayname>
<share_with_additional_info/>
<mail_send>0</mail_send>
<attributes/>
</data>
</ocs>
In OCIS:
- Create users:
Alice,BrianandCarol - User
Alicecreates a folderTMP - User
Alicemakes sure for the presence of folderTMPand PROPFIND works on both endpoints:
curl -u alice:1234 -X PROPFIND http://localhost:9140/remote.php/dav/files/alice/TMP -v | xmllint --format -
curl -u alice:1234 -X PROPFIND http://localhost:9140/remote.php/webdav/TMP -v | xmllint --format -
< HTTP/1.1 207 Multi-Status
<?xml version="1.0" encoding="utf-8"?>
<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/alice/folder/</d:href>
<d:propstat>
<d:prop>
<oc:id>MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTYyOjFlMDQxZWIxLWQzZDMtNGZjYy04MTQxLWM1M2RiOWFmYTg5Yw==</oc:id>
<oc:fileid>MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTYyOjFlMDQxZWIxLWQzZDMtNGZjYy04MTQxLWM1M2RiOWFmYTg5Yw==</oc:fileid>
<d:getetag>"3017e62a28a41f44828c78187888c958"</d:getetag>
<oc:permissions>WCKDNVR</oc:permissions>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
<oc:size>4096</oc:size>
<d:getlastmodified>Mon, 08 Jun 2020 10:08:10 UTC</d:getlastmodified>
<oc:favorite>0</oc:favorite>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
- User
Aliceshares folderTMPwith userBrian:
curl -u alice:1234 -X POST "http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares" -H "OCS_APIREQUEST: true" -d path=TMP -d shareType=0 -d shareWith=brian | xmllint --format -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1177 100 1141 100 36 10764 339 --:--:-- --:--:-- --:--:-- 11103
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
</meta>
<data>
<id>32e0dfe2-02e1-478f-92ac-457f0dc381cb</id>
<share_type>0</share_type>
<uid_owner>alice</uid_owner>
<displayname_owner>User Alice</displayname_owner>
<permissions>31</permissions>
<stime>1591157454</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>alice</uid_file_owner>
<displayname_file_owner>User Alice</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<state>0</state>
<path>/TMP</path>
<item_type>folder</item_type>
<mimetype>httpd/unix-directory</mimetype>
<storage_id>1284d238-aa92-42ce-bdc4-0b0000009162</storage_id>
<storage>0</storage>
<item_source>28468a89-f5b8-4ff8-aad1-98f2897a750a</item_source>
<file_source>28468a89-f5b8-4ff8-aad1-98f2897a750a</file_source>
<file_parent/>
<file_target>/TMP</file_target>
<share_with>brian</share_with>
<share_with_displayname>User Brian</share_with_displayname>
<share_with_additional_info/>
<mail_send/>
</data>
</ocs>
- And the response to user
Aliceabout the created share is:
curl -u alice:1234 -X GET "http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares?path=TMP" -H "OCS_APIREQUEST: true"| xmllint --format -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1160 100 1160 0 0 13975 0 --:--:-- --:--:-- --:--:-- 13809
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
</meta>
<data>
<element>
<id>32e0dfe2-02e1-478f-92ac-457f0dc381cb</id>
<share_type>0</share_type>
<uid_owner>alice</uid_owner>
<displayname_owner>User Alice</displayname_owner>
<permissions>31</permissions>
<stime>1591157454</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>alice</uid_file_owner>
<displayname_file_owner>User Alice</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<state>0</state>
<path>/TMP</path>
<item_type>folder</item_type>
<mimetype>httpd/unix-directory</mimetype>
<storage_id>1284d238-aa92-42ce-bdc4-0b0000009162</storage_id>
<storage>0</storage>
<item_source>28468a89-f5b8-4ff8-aad1-98f2897a750a</item_source>
<file_source>28468a89-f5b8-4ff8-aad1-98f2897a750a</file_source>
<file_parent/>
<file_target>/TMP</file_target>
<share_with>brian</share_with>
<share_with_displayname>User Brian</share_with_displayname>
<share_with_additional_info/>
<mail_send/>
</element>
</data>
</ocs>
- User
Brianchecks for the presence of received shareTMP:
curl -u brian:12345 -X PROPFIND http://localhost:9140/remote.php/dav/files/brian/TMP -v | xmllint --format -
< HTTP/1.1 404 Not Found
curl -u brian:12345 -X PROPFIND http://localhost:9140/remote.php/webdav/TMP -v | xmllint --format -
< HTTP/1.1 404 Not Found
- User
Brianshares the received shareTMPwith userCarol:
curl -u brian:12345 -X POST "http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares" -H "OCS_APIREQUEST: true" -d path=TMP -d shareType=0 -d shareWith=carol | xmllint --format -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 177 100 141 100 36 3710 947 --:--:-- --:--:-- --:--:-- 4657
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>error</status>
<statuscode>998</statuscode>
<message>not found</message>
</meta>
</ocs>
Metadata
Metadata
Assignees
Labels
Interaction:Needs-helpAsking some hints to engineering when the issue can't be reproducedType:Discussion
Activity
jasson99 commentedon Jun 8, 2020
Even if the sharing looks good when we look at the
successfulresponse and status code for the sharer, the receiver does not have the share received. That's why resharing does not work. This means, maybe, the share is not created successfully in spite of getting success messages and status code.[-]Resharing a received share does not work[/-][+]Resharing a share does not work[/+][-]Resharing a share does not work[/-][+]Sharing does not work[/+][-]Sharing does not work[/-][+]Sharing seems to work but does not work[/+]individual-it commentedon Jun 9, 2020
need to re-check with EOS
C0rby commentedon Jun 9, 2020
In OCIS the user first has to accept files that were shared.
With
The shared files can be listed. It looks like so:
To accept the share one has to send this request. But yes this is not implemented yet.
PVince81 commentedon Jun 10, 2020
seems you missed adding
-X POSTto the accept requestI happened to have tried it with a non-existing request and it returns
{"ocs":{"meta":{"status":"error","statuscode":996,"message":"grpc update received share request (accept) failed"}}}instead of a 404, so probably another thing to look into (error handling)PVince81 commentedon Jun 10, 2020
right, with ocfs it's not implemented:
C0rby commentedon Jun 10, 2020
I did implement a prototype but still need some feedback on it.
owncloud/reva#6
individual-it commentedon Jun 10, 2020
Testing with EOS blocked by https://github.com/owncloud/ocis/issues/253
with EOS we even cannot upload a file
jasson99 commentedon Jun 11, 2020
Issue : https://github.com/owncloud/ocis-reva/issues/260 is created since sharee gets information about
all the shareseven when path is provided for the retrieval of information about aspecificshare.C0rby commentedon Jun 15, 2020
Is that even necessary?
I'm not sure if we need to be able to list a single recieved share. (Before it is accepted)
phil-davis commentedon Jun 15, 2020
I guess this "feature" is available in ownCloud10 - @jasson99 ?
So a client app could do such a request and maybe expect to get just the already-filtered list of share(s) for the requested resource.
So it depends how much of this detailed oC10 compatible behavior is to be strictly followed.
individual-it commentedon Jun 16, 2020
with EOS accepting the share works and the receiver can see the share through the
/webdav/Sharesendpoint, but not through the/davendpointindividual-it commentedon Jun 18, 2020
tests have been added, so I'm taking away the QA-team label. If more tests are needed please add the label again
individual-it commentedon Jul 9, 2020
this also blocks running sharing tests on EOS, because the path where the shares are accessible are different to oc10, so ether we have to adjust the EOS settings or make the test-code smarter
stale commentedon Jun 6, 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.
kiranparajuli589 commentedon Jun 9, 2021
sharing works properly with
ocisnow:create a share
Details
receive a share as pending
Details
accept a share
Details
get share
Details
decline a share
Details
file is now gone for the sharee (a declined share still exists in Shares directory #2128)