Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share Link (files app) of Directory not working when Federated share inside #2767

Closed
eggithub opened this issue Dec 19, 2016 · 4 comments
Closed

Comments

@eggithub
Copy link

Steps to reproduce

  1. Share DirA with UserY@Cloud2 from UserX@Cloud1
  2. Create DirB in root of UserY@Cloud2
  3. Move share DirA at UserY@Cloud2 to DirB
  4. Share link of DirA -> Error message PopUp: Error while sharing Path contains files shared with you

Note: I'm using self-signed certificates

Expected behaviour

No error should arise. I am able to Share link of DirB in DirA at UserY@Cloud2 with no error popup.

Actual behaviour

Error message PopUp: Error while sharing Path contains files shared with you

And the Share Link hourglass keeps spinning

Server configuration

Operating system:
Linux ... 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux

Web server:
Server version: Apache/2.4.23 (Debian)
Server built: 2016-11-19T23:33:13

Database:
mysql Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3

PHP version:
PHP 5.6.27-0+deb8u1 (cli) (built: Oct 15 2016 15:53:28)

Nextcloud version: (see Nextcloud admin page)
11.0.0
Updated from an older Nextcloud or fresh install:
Updated from 10.0.2

Signing status:

No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.4.1
  - comments: 1.1.0
  - contacts: 1.5.2
  - dav: 1.1.1
  - external: true
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_external: 1.1.2
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - files_videoplayer: 1.0.0
  - firstrunwizard: 2.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - twofactor_totp: 0.5.0
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1
Disabled:
  - admin_audit
  - encryption
  - files_accesscontrol
  - files_automatedtagging
  - files_retention
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

Config report
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/media\/nextcloud\/data",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbtype": "mysql",
        "version": "11.0.0.10",
        "dbname": "nextcloud",
        "dbhost": "localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": ***REMOVED SENSITIVE VALUE***
        },
        "maintenance": false,
        "loglevel": 2,
        "filelocking.enabled": "true"
    }
}```
</details>

**Are you using external storage, if yes which one:** local/smb/sftp/...
no

**Are you using encryption:** yes/no
no

**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
no



### Client configuration
**Browser:**
FF

**Operating system:**
Win10

### Logs
#### Web server error log
<details>
<summary>Web server error log</summary>

Error
federation
GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: self signed certificate
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 103: GuzzleHttp\Exception\RequestException wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\RingException))
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 132: GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
/var/www/nextcloud/3rdparty/react/promise/src/FulfilledPromise.php - line 25: GuzzleHttp\RequestFsm->GuzzleHttp{closure}(Array)
/var/www/nextcloud/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php - line 55: React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php - line 43: GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 134: GuzzleHttp\Message\FutureResponse proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 165: GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 150: GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
/var/www/nextcloud/lib/private/Http/Client/Client.php - line 203: GuzzleHttp\Client->post('https //...', Array)
/var/www/nextcloud/apps/federation/lib/BackgroundJob/RequestSharedSecret.php - line 154: OC\Http\Client\Client->post('https //...', Array)
/var/www/nextcloud/lib/private/BackgroundJob/Job.php - line 53: OCA\Federation\BackgroundJob\RequestSharedSecret->run(Array)
/var/www/nextcloud/apps/federation/lib/BackgroundJob/RequestSharedSecret.php - line 135: OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
/var/www/nextcloud/apps/federation/lib/BackgroundJob/RequestSharedSecret.php - line 120: OCA\Federation\BackgroundJob\RequestSharedSecret->parentExecute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
/var/www/nextcloud/cron.php - line 121: OCA\Federation\BackgroundJob\RequestSharedSecret->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
{main}
2016-12-19T20:15:02+0100

Error
PHP
call_user_func_array() expects parameter 1 to be a valid callback, class 'OCA\Files_Sharing\External\Storage' does not have a method 'getShareId' at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php#501

</details>

#### Nextcloud log (data/nextcloud.log)
<details>
<summary>Nextcloud log</summary>

{"reqId":"6gDOm4S7SkU6P/dAcpF5","remoteAddr":"","app":"federation","message":"Exception: {"Exception":"GuzzleHttp\\Exception\\RequestException","Message":"cURL error 60: SSL certificate problem: self signed certificate","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RequestFsm.php(103): GuzzleHttp\\Exception\\RequestException::wrapException(Object(GuzzleHttp\\Message\\Request), Object(GuzzleHttp\\Ring\\Exception\\RingException))\n#1 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RequestFsm.php(132): GuzzleHttp\\RequestFsm->__invoke(Object(GuzzleHttp\\Transaction))\n#2 \/var\/www\/nextcloud\/3rdparty\/react\/promise\/src\/FulfilledPromise.php(25): GuzzleHttp\\RequestFsm->GuzzleHttp\\{closure}(Array)\n#3 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/ringphp\/src\/Future\/CompletedFutureValue.php(55): React\\Promise\\FulfilledPromise->then(Object(Closure), NULL, NULL)\n#4 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Message\/FutureResponse.php(43): GuzzleHttp\\Ring\\Future\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\n#5 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RequestFsm.php(134): GuzzleHttp\\Message\\FutureResponse::proxy(Object(GuzzleHttp\\Ring\\Future\\CompletedFutureArray), Object(Closure))\n#6 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php(165): GuzzleHttp\\RequestFsm->__invoke(Object(GuzzleHttp\\Transaction))\n#7 \/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php(150): GuzzleHttp\\Client->send(Object(GuzzleHttp\\Message\\Request))\n#8 \/var\/www\/nextcloud\/lib\/private\/Http\/Client\/Client.php(203): GuzzleHttp\\Client->post('https:\/\/...', Array)\n#9 \/var\/www\/nextcloud\/apps\/federation\/lib\/BackgroundJob\/RequestSharedSecret.php(154): OC\\Http\\Client\\Client->post('https:\/\/...', Array)\n#10 \/var\/www\/nextcloud\/lib\/private\/BackgroundJob\/Job.php(53): OCA\\Federation\\BackgroundJob\\RequestSharedSecret->run(Array)\n#11 \/var\/www\/nextcloud\/apps\/federation\/lib\/BackgroundJob\/RequestSharedSecret.php(135): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#12 \/var\/www\/nextcloud\/apps\/federation\/lib\/BackgroundJob\/RequestSharedSecret.php(120): OCA\\Federation\\BackgroundJob\\RequestSharedSecret->parentExecute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#13 \/var\/www\/nextcloud\/cron.php(121): OCA\\Federation\\BackgroundJob\\RequestSharedSecret->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#14 {main}","File":"\/var\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Exception\/RequestException.php","Line":51}","level":3,"time":"2016-12-19T20:00:03+01:00","method":"--","url":"--","user":"--","version":"11.0.0.10"}

{"reqId":"ji6qVFI3iVVp2g1hle+X","remoteAddr":"REMOVED SENSITIVE VALUE","app":"PHP","message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OCA\Files_Sharing\External\Storage' does not have a method 'getShareId' at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php#501","level":3,"time":"2016-12-19T20:00:40+01:00","method":"POST","url":"/nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json","user":"REMOVED SENSITIVE VALUE","version":"11.0.0.10"}

</details>


@schiessle
Copy link
Member

schiessle commented Dec 20, 2016

This happens because we block nested shares because this can create ugly loops.

@rullzer what do you think? Can we be less strict here? If we would allow it, would it be possible to create infinity loops? That's the main thing we need to avoid. If this is not possible I'm fine with allowing it.

@rullzer
Copy link
Member

rullzer commented Dec 20, 2016

Well the error is accurate. We don't allow it. because it breaks our sharing model. As @schiessle says it can create infinite loops. But also it makes providing the owner with control hard. Since they then can no longer get the complete list of people having access to their files.

@eggithub
Copy link
Author

eggithub commented Dec 20, 2016

hi there,

not hindered by any knowledge, but how does a "Share Link" (so not share with another user2somecloud) in this case create an infinite loop here; the share link is this endpoint right? -> I think I have it wrong about the share link being the endpoint of a share because you can add a link with "add to your nextcloud" so this means that it is still possible to create infinite loops... my bad...

I just wanted to group a number of shares created in nextcloudA for nextcloudB in a folder at nextcloudB, so I could easily share that folder with non-nextcloud users from a server nextcloudB that is open to the world instead of nextcloudA which is somewhat more closed off...

Technically your comments also mean that when "resharing" is enabled, this means that you can only re-share something that is already a share?

Maybe the following is a feature request but, apart from an admin setting to en/disable re-sharing globally, shouldn't a en/disable re-sharing setting be something that belongs also in the Personal settings?

I do also believe that shares should behandled different from how they are handled now. I think shares should be put in a folder like: /shares/user@cloud. This way you get already something like a structure without doing anything. This is probably discussed many times in the past but hey ;)

Oh and I also wanted to add that you guys at nextcloud and co-developpers are doing an excellent job with the product! I just love it!

Thanx!

@MorrisJobke
Copy link
Member

This is how it currently works. We try to improve the sharing experience steadily. We also think about making it better browsable.

Sorry to say it, but currently we can't do much regarding the shares inside shares. The re-share setting as of now only specifies if a received share could be shared to another person by the recipient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants