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

Unable to generate new share from shared external storage #585

Closed
X4LD1M0 opened this issue Jul 27, 2016 · 10 comments
Closed

Unable to generate new share from shared external storage #585

X4LD1M0 opened this issue Jul 27, 2016 · 10 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: external storage

Comments

@X4LD1M0
Copy link

X4LD1M0 commented Jul 27, 2016

On my NC setup I have external storages (local) which are only visible to Admin. The Admin then shares with group with different privileges. When a user then tries to re-share a (sub)folder it fails.

Steps to reproduce

  1. Create external storage visible to Admin only
  2. Admin shares folder(s) with normal user with re-sharing rights
  3. Normal user tries to generate new share link

Expected behaviour

The new share should be created and visible on the web-page, with the possibility to make changes or remove the share link.

Actual behaviour

When ticking the 'Share link' box, the animated icon comes up. In the nc_share table in the DB a new entry is created, but it doesn't show on the web-page. It keeps the waiting image spinning. Even when refreshing the page, it shows there is no existing share.

When using the token in the database you can access the shared folder as expected.

Server configuration

Operating system: Debian 8.5 64-bit

Web server: Apache2 2.4.10

Database: mySQL 5.5.50 (on separate VM)

PHP version: 5.6.23

Nextcloud version: 9.0.53

Fresh install

Installed NC from NC website

Signing status:

Signing status

No errors have been found.

List of activated apps:

App list

Enabled:

  • activity: 2.2.1
  • admin_audit: 1.0.0
  • announcementcenter: true
  • bookmarks: 0.7
  • comments: 0.2
  • dav: 0.1.6
  • federatedfilesharing: 0.1.0
  • federation: 0.0.4
  • files: 1.4.4
  • files_external: 0.5.2
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.9.1
  • files_texteditor: 2.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 14.5.0
  • notifications: 0.2.3
  • password_policy: 1.0.0
  • provisioning_api: 0.4.1
  • registration: 0.2.1
  • richdocuments: 1.1.3
  • systemtags: 0.2
  • templateeditor: 0.1
  • theming: 0.1.0
  • updatenotification: 0.1.0
    Disabled:
  • encryption
  • external
  • user_external
  • user_ldap
  • user_saml

The content of config/config.php:

Config report

{
"system": {
"instanceid": "occ3bgzu13dp",
"passwordsalt": "_REMOVED SENSITIVE VALUE",
"secret": "_REMOVED SENSITIVE VALUE
",
"trusted_domains": [
"192.168.7.245"
],
"datadirectory": "/media/nextcloud",
"overwrite.cli.url": "http://192.168.7.245",
"dbtype": "mysql",
"version": "9.0.53.0",
"dbname": "nextcloud",
"dbhost": "kobol.io-node.net",
"dbtableprefix": "nc_",
"dbuser": "_REMOVED SENSITIVE VALUE",
"dbpassword": "_REMOVED SENSITIVE VALUE
",
"logtimezone": "UTC",
"installed": true,
"trusted_proxies": [
"192.168.7.241"
],
"overwritehost": "cloud.wijman.me.uk",
"overwriteprotocol": "https",
"overwritewebroot": "/",
"overwritecondaddr": "^192.168.7.241$",
"mail_from_address": "cloud",
"mail_smtpmode": "sendmail",
"mail_domain": "wijman.me.uk",
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "localhost",
"port": 6379
},
"maintenance": false,
"loglevel": 2,
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "mail.mailarena.net",
"mail_smtpport": "25",
"mail_smtpname": "_REMOVED SENSITIVE VALUE",
"mail_smtppassword": "_REMOVED SENSITIVE VALUE
",
"theme": "io-node",
"htaccess.RewriteBase": "/",
"updater.server.url": "https://updates.nextcloud.org/updater_server/",
"filesystem_check_changes": 0,
"preview_max_x": 640,
"preview_max_y": 640
}
}

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: none

Client configuration

Browser: Chrome 52.0.2743.82 (64-bit)

Operating system: Windows 10 + Debian 8.5 with KDE

Logs

Web server error log

Web server error log

192.168.7.1 - - [27/Jul/2016:09:11:10 +0100] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2FNAS%20-%20Photos HTTP/1.1" 200 1054 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36" 192.168.7.1 - - [27/Jul/2016:09:11:29 +0100] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1113 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"
192.168.7.1 - - [27/Jul/2016:09:11:33 +0100] "GET /apps/activity/api/v2/activity/filter?format=json&object_type=files&object_id=135745 HTTP/1.1" 304 301 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"
192.168.7.1 - - [27/Jul/2016:09:11:33 +0100] "PROPFIND /remote.php/dav/systemtags-relations/files/135745 HTTP/1.1" 404 1239 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"
192.168.7.1 - - [27/Jul/2016:09:11:33 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2FNAS%20-%20Photos%2FRandom%20Bikes&reshares=true HTTP/1.1" 200 1073 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"
192.168.7.1 - - [27/Jul/2016:09:11:33 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2FNAS%20-%20Photos%2FRandom%20Bikes&shared_with_me=true HTTP/1.1" 200 1073 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"
192.168.7.1 - - [27/Jul/2016:09:11:36 +0100] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 7416 "-" "Mozilla/5.0 (Linux) mirall/2.2.2"
192.168.7.1 - - [27/Jul/2016:09:11:36 +0100] "POST /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json HTTP/1.1" 200 824 "-" "Mozilla/5.0 (X11;Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"
192.168.7.1 - - [27/Jul/2016:09:11:37 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2FNAS%20-%20Photos%2FRandom%20Bikes&reshares=true HTTP/1.1" 200 935 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36"

#### Nextcloud log (data/nextcloud.log)

Nextcloud log

{"reqId":"d4hGnJSSqPkQVFyz7EK6","remoteAddr":"192.168.7.1","app":"webdav","message":"Exception: {"Message":"HTTP\/1.1 404 Entity does not exist or is not available","Exception":"Sabre\DAV\Exception\NotFound","Code":0,"Trace":"#0 \/var\/www\/nextcloud_9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php(76): OCA\DAV\SystemTag\SystemTagsObjectTypeCollection->getChild('135745')\n#1 \/var\/www\
/nextcloud_9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(903): Sabre\DAV\Tree->getNodeForPath('systemtags-rela...')\n#2 \/var\/www\/nextcloud_9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(334): Sabre\DAV\Server->getPropertiesForPath('systemtags-rela...', Array, 1)\n#3 [internal function]: Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\
Response))\n#4 /var\/www\/nextcloud_9.0.53\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 \/var\/www\/nextcloud_9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\Event\EventEmitter->emit('method:PROPFIND', Array)\n#6 \/var\/www\/nextcloud_9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#7 \/var\/www\/nextcloud_9.0.53\/apps\/dav\/lib\/server.php(148): Sabre\DAV\Server->exec()\n#8 \/var\/www\/nextcloud_9.0.53\/apps\/dav\/appinfo\/v2\/remote.php(29): OCA\DAV\Server->exec()\n#9 \/var\/www\/nextcloud_9.0.53\/remote.php(138): require_once('\/var\/www\/nextcl...')\n#10 {main}","File":"\/var\/www\/nextcloud_9.0.53\/apps\/dav\/lib\/systemtag\/systemtagsobjecttypecollection.php","Line":130,"User":"swijman"}","level":0,"time":"2016-07-27T08:11:33+00:00","method":"PROPFIND","url":"/remote.php/dav/systemtags-relations/files/135745","user":"swijman"}
{"reqId":"zYQ8KeKi7szw/CIBA0Yz","remoteAddr":"192.168.7.1","app":"admin_audit","message":"The folder "/Random Bikes" with ID "135745" has been shared via link with permissions "1" (Share ID: 23)","level":1,"time":"2016-07-27T08:11:36+00:00","method":"POST","url":"/ocs/v2.php/apps/files
_sharing/api/v1/shares?format=json","user":"swijman"}
{"reqId":"zYQ8KeKi7szw/CIBA0Yz","remoteAddr":"192.168.7.1","app":"PHP","message":"OCP\Files\NotFoundException: at /var/www/nextcloud_9.0.53/apps/files_sharing/api/share20ocs.php#110","level":3,"time":"2016-07-27T08:11:36+00:00","method":"POST","url":"/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json","user":"swijman"}

#### Browser log

Browser log

Network log:
https://cloud.wijman.me.uk/remote.php/dav/systemtags-relations/files/135745 Failed to load resource: the server responded with a status of 404 (Not Found)

@X4LD1M0
Copy link
Author

X4LD1M0 commented Jul 27, 2016

Just to add to this. It seems only to happen to sub-folders/files of the main shared folder. When trying to generate a share link from the original main folder that is successful.

@MorrisJobke MorrisJobke added feature: external storage 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 27, 2016
@MorrisJobke
Copy link
Member

cc @icewind1991

@protree
Copy link

protree commented Jul 31, 2016

Maybe related to owncloud/core#25557 (comment) ?

@X4LD1M0
Copy link
Author

X4LD1M0 commented Aug 1, 2016

I don't think it is the same issue. Login works normal. Sharing the main external share by other user is possible, only sub-folders and/or files is not possible.

Sharing link is working when extracting the token (that was generated but not visible on the GUI) from the DB.

@mwpow3ll
Copy link

mwpow3ll commented Aug 4, 2016

This happens to me on the admin account using a top level non-external folder

Server configuration
Operating system: Fedora 23 64-bit
Web server: nginx 1.8.1
Database: MariaDB/MySQL 10.0.25
PHP version: 5.6.24
Nextcloud version: 9.0.53

@X4LD1M0
Copy link
Author

X4LD1M0 commented Aug 22, 2016

Will this be check (and fixed) before NC 10 will be released?

@X4LD1M0
Copy link
Author

X4LD1M0 commented Aug 23, 2016

I have just upgraded to NC 10 RC1 and it seems to work now. I will monitor this until NC10 is official released.

@rullzer
Copy link
Member

rullzer commented Sep 4, 2016

@io-node can you test again now NC10 is out?

@X4LD1M0
Copy link
Author

X4LD1M0 commented Sep 4, 2016

With NC10 it seems to work as expected. Closing it.

@X4LD1M0 X4LD1M0 closed this as completed Sep 4, 2016
@PakhomGolynga
Copy link

I have the same issue on 11.0.3 (stable).
Steps to reproduce:

  1. Create external storage (local) with sharing permissions
  2. Upload file to this share
  3. Click on properties and select "Sharing"
    After that I see circle and nothing else. In next enter in this share this file isn't visible.

2017-05-20-000739_1918x1059_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: external storage
Projects
None yet
Development

No branches or pull requests

6 participants