Can't make sharing in external storage

[/details]

Nextcloud version (v20.0.4):
Operating system and version (Debian 8.7):
Apache or nginx version (nginx 1.12.2):
PHP version (7.2.32):

The issue you are facing:When I use external storages(local) and try to share files,it always show me ‘Unable to load the shares list’.it seems that nextcloud opens the file in a fault directory(nextcloud/data/user/files/xxx),but the correct directory is in (nextcloud/xxx).Viewing or downloading files is OK,and sharing files out the external storage is also working fine.

Is this the first time you’ve seen this error? (Y/N):N

Steps to replicate it:

  1. Create a external storage(local,usable for everyone),enable sharing
  2. Admin tries to make sharing any files(or folders)

The output of your Nextcloud log in Admin > Logging:

ErrorPHP2021-01-03T23:08:57+0800
Error: imagecreatefromstring(): Empty string or invalid image at /data/wwwroot/nextcloud/lib/private/legacy/OC_Image.php#624
ErrorPHP2021-01-03T23:08:57+0800
Error: file_get_contents(/data/wwwroot/nextcloud/data/wodexiaobai322/files/rclone/Amatsukaze/README.png): failed to open stream: No such file or directory at /data/wwwroot/nextcloud/lib/private/Files/Storage/Local.php#272
ErrorPHP2021-01-03T23:08:57+0800
Error: exif_imagetype(): Read error! at /data/wwwroot/nextcloud/lib/private/legacy/OC_Image.php#547

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
      0 => 'xxx',
      1 => 'xxx',
      2 => 'xxx'
  ),
  'datadirectory' => '/data/wwwroot/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.4.0',
  'overwrite.cli.url' => 'https://xxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_wodexiaobai31',
  'dbpassword' => 'xxx',
  'installed' => true,
);

The output of your Apache/nginx/system log in /var/log/____:

----error.log for nginx----

2021/01/01 00:10:00 [notice] 24596#0: signal process started

----access.log for nginx----

108.162.245.119 - - [03/Jan/2021:23:18:00 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:18:30 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
182.117.96.33 - - [03/Jan/2021:23:18:42 +0800] "GET /boaform/admin/formLogin?username=admin&psd=admin HTTP/1.0" 404 162 "-" "-"
108.162.245.119 - - [03/Jan/2021:23:19:00 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:19:06 +0800] "PUT /apps/user_status/heartbeat HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:19:07 +0800] "GET /ocs/v2.php/apps/user_status/api/v1/user_status HTTP/1.1" 200 157 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:19:31 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:20:00 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:20:41 +0800] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"
108.162.245.119 - - [03/Jan/2021:23:21:06 +0800] "GET /csrftoken HTTP/2.0" 200 121 "-" "Mozilla/5.0 (Linux; Android 10; J9110 Build/55.1.A.12.28; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36"

Thanks for everyone’s help!
Here is some screenshots
in external storage
Screenshot_20210103-232708
in normal directory
Screenshot_20210103-232821

Hi,

I’m also having the same issue.
Using Nginx, Debian 10.
Can’t share my external files to other users.