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

Content in external storage (local) cannot be shared with users who are not logged in #7181

Closed
GetMike opened this issue Nov 15, 2017 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage feature: sharing

Comments

@GetMike
Copy link

GetMike commented Nov 15, 2017

Steps to reproduce

  1. Create an external storage in your Nextcloud - in my case it is a local mediafolder on my server with photos as content used also by Plex Media Server.
  2. Share this folder via link to others by sending this link in an email.
  3. As email-recepient open this link - note: you are not logged in, you have no account on your nextcloud server.

Expected behaviour

I excpect, that all the content of this shared folder is also shown to these users without account / login. Clicking a file should open this file (in my case photos / gallery).

Actual behaviour

Clicking the link opens the folder and shows the photos as thumbnails - subfolders are also shown and accessible. Content in subfolders is shown as thumbnails.

BUT: If you click one photo to open it, an error is shown:

“Fehler! Konnte keine Vorschau dieser Datei erzeugen. Bitte wechsle zum nächsten Bild, während im Hintergrund das Bild aus der Diashow entfernt wird.”

The log shows:
Error - Exception: Could not locate node linked to ID: 9333 (example!)

I tried the same with a folder in the nextcloud filesystem (no external storage) and this works correct - the files can be opened by users without login.


Sorry, some details of the following configurations/logs are missing in the moment, because I have no access to my server from outside. I will deliver this information as soon as possible!


Server configuration

Operating system: openmediavault 3.0.91(debian linux)

Web server: nginx version 1.6.2

Database: mysql 5.5.58-0+deb8u1 (Debian)

PHP version: PHP 5.6.30-0+deb8u1 (cli)

Nextcloud version: (see Nextcloud admin page) 12.0.3

Updated from an older Nextcloud/ownCloud or fresh install: Update from 12.0.2

Where did you install Nextcloud from: initial install from nextcloud download link via commandline, updates via nextcloud web updater.

Signing status:

No errors have been found.
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

Enabled: - activity: 2.5.2 - apporder: 0.4.0 - bruteforcesettings: 1.0.2 - calendar: 1.5.6 - comments: 1.2.0 - contacts: 2.0.1 - dashboard: 4.0.5 - dav: 1.3.0 - federatedfilesharing: 1.2.0 - federation: 1.2.0 - files: 1.7.2 - files_external: 1.3.0 - files_pdfviewer: 1.1.1 - files_sharing: 1.4.0 - files_texteditor: 2.4.1 - files_trashbin: 1.2.0 - files_versions: 1.5.0 - files_videoplayer: 1.1.0 - firstrunwizard: 2.1 - gallery: 17.0.0 - gpxpod: 2.2.1 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextcloud_announcements: 1.1 - notes: 2.3.1 - notifications: 2.0.0 - oauth2: 1.0.5 - passman: 2.1.4 - password_policy: 1.2.2 - provisioning_api: 1.2.0 - serverinfo: 1.2.0 - sharebymail: 1.2.0 - survey_client: 1.0.0 - systemtags: 1.2.0 - tasks: 0.9.5 - theming: 1.3.0 - twofactor_backupcodes: 1.1.1 - updatenotification: 1.2.0 - workflowengine: 1.2.0 Disabled: - admin_audit - direct_menu - encryption - user_external - user_ldap
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

"system": { "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "***.***.***.***", "*****.**" ], "datadirectory": "\/media\/92ca31e2-a87e-45b0-a797-131cf9aaa8cd\/www\/nextcloud\/data", "overwrite.cli.url": "http:\/\/localhost", "dbtype": "mysql", "version": "12.0.3.3", "dbname": "******", "dbhost": "localhost", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "instanceid": "****", "maintenance": false, "theme": "", "loglevel": 2 }
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

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: no

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser: Firefox 56.0.2 (windows) // Chrome Version 62.0.3202.84 (android)

Operating system: windows 10 // android 7.0

Logs

Web server error log

Web server error log - tbd
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log - tbd
Insert your Nextcloud log here

Browser log

Browser log - tbd
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@MorrisJobke
Copy link
Member

Please check the logs for errors.

And how is the external storage mounted? Could you describe what kind of authentication you are using for mounting the storage? And what kind of storage?

@smokku
Copy link

smokku commented Nov 25, 2017

I noticed that this happens only when you share the root of the external drive.
If you share a subdirectory of external drive, the gallery images work just fine.

@MorrisJobke
Copy link
Member

I noticed that this happens only when you share the root of the external drive.
If you share a subdirectory of external drive, the gallery images work just fine.

@icewind1991 This looks like an actual bug in the etag propagation. 🤔

@romanrm
Copy link

romanrm commented Mar 1, 2018

Same issue here. And as @smokku also mentioned, if you create external storage as

/some/local/dir => dir

then trying to share "dir" itself from the NextCloud, it will result in the described Gallery problem.

But if you make some folder, e.g. "/some/local/dir/public", and then try to share this "public" folder -- then Gallery works. Maybe this will be good enough for you as a workaround for the time being.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@ostaszewskik
Copy link

ostaszewskik commented Jul 17, 2018

I have the very same issue and I can confirm that if you create a subfolder in external storage folder (local storage, ext4 physical disk) and then share it, gallery previews work fine. Thank you @romanrm for sharing this workaround.

@MorrisJobke is there any work in progress about this bug? I like to share photos with my family form my home server and I store them on external storage.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 17, 2018
@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 7, 2019
@skjnldsv
Copy link
Member

As the version of the software you've reported this for has reached end of life, I will close this ticket. If this is still happening after an upgrade to the latest version, feel free to reopen

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 bug feature: external storage feature: sharing
Projects
None yet
Development

No branches or pull requests

7 participants