NC 13 No file-sharing possible

Nextcloud version: 13.0.8
Operating system and version : alpine 3.8 running on
Host : Proxmox 4.15.18-8-pve
nginx version : 1.14.1
PHP version : 7.2.13

The issue you are facing:
After installing and configuring my NC, I am unable to share files with other people, neither by Link nor with groups / users I created as Admin. The webpanel doesn’t show the sharing-icon.

Everything else is working: I can sync my files with clients, use the addressbook, calendar etc.

Additional information:

  • NC 13 is installed via alpine’s package manager.

  • It uses a nginx / php-fpm / mariadb backend.

  • The data directory is mounted in the LXC container and resides on a ZFS system in Proxmox.

  • The apps-appstore directory is on the same, mounted ZFS.

  • The apps directory is within the container natively.

  • When I try to share a file / folder from within the Android app, I just get the error “Server misconfigured” and the attached log.

Is this the first time you’ve seen this error? : Yes

The output of your config.php file:

<?php
$CONFIG = array (
  'datadirectory' => '/mnt/nextcloud/data',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/share/webapps/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 =>
    array (
      'path' => '/mnt/nextcloud/apps-appstore',
      'url' => '/apps-appstore',
      'writable' => true,
    ),
  ),
  'updatechecker' => false,
  'check_for_working_htaccess' => false,
  'installed' => true,
  'instanceid' => 'deleted',
  'passwordsalt' => 'deleted',
  'secret' => 'deleted',
  'trusted_domains' =>
  array (
    0 => 'deleted',
  ),
'overwrite.cli.url' => 'deleted',
  'dbtype' => 'mysql',
  'version' => '13.0.8.2',
  'dbname' => 'deleted',
  'dbhost' => 'localhost:9000',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'deleted',
  'dbpassword' => 'deleted',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The output of your nextcloud log: cat nextcloud.log | tail

{"reqId":"OhzeQWwmL41rWNruzZvr","level":3,"time":"2018-12-09T21:59:38+00:00","remoteAddr":"178.1.231.253","user":"deleted","app":"index","method":"GET","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/sharees?format=json&itemType=file&search=st&page=1&perPage=50","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/sharees) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/sharees?format=json&itemType=file&search=st&page=1')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.3.2","version":"13.0.8.2"}
{"reqId":"U4EiTvUec8ku9M8DDA94","level":3,"time":"2018-12-09T21:59:38+00:00","remoteAddr":"178.1.231.253","user":"deleted","app":"index","method":"GET","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/sharees?format=json&itemType=file&search=ste&page=1&perPage=50","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/sharees) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/sharees?format=json&itemType=file&search=ste&page=1')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.3.2","version":"13.0.8.2"}
{"reqId":"lsN75ux1sPCP8ViibPmW","level":3,"time":"2018-12-09T21:59:50+00:00","remoteAddr":"178.1.231.253","user":"deleted","app":"index","method":"GET","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?path=%2FKalligraphie%2F&reshares=false&subfiles=false","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares?path=%2FKalligraphie%2F&reshares=false&sub')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.3.2","version":"13.0.8.2"}
{"reqId":"JiPPLr2DkS6uXIUyopbl","level":3,"time":"2018-12-09T21:59:50+00:00","remoteAddr":"178.1.231.253","user":"deleted","app":"index","method":"POST","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/ap')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.3.2","version":"13.0.8.2"}
{"reqId":"G6QvpH61qpIsk835i1qE","level":3,"time":"2018-12-09T21:59:52+00:00","remoteAddr":"178.1.231.253","user":"deleted","app":"index","method":"GET","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?path=%2FKalligraphie%2F&reshares=false&subfiles=false","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares?path=%2FKalligraphie%2F&reshares=false&sub')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.3.2","version":"13.0.8.2"}
{"reqId":"2z0Hw6YqZTbFBU4LBAXW","level":3,"time":"2018-12-09T21:59:52+00:00","remoteAddr":"178.1.231.253","user":"deleted","app":"index","method":"POST","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/ap')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.3.2","version":"13.0.8.2"}
{"reqId":"zSYGtScokfZglVemErUD","level":2,"time":"2018-12-10T01:20:15+00:00","remoteAddr":"194.147.32.109","user":"--","app":"core","method":"GET","url":"\/\/about.php","message":"Trusted domain error. \"194.147.32.109\" tried to access using \"178.1.231.253\" as host.","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-862.14.4.el7.x86_64","version":"13.0.8.2"}
{"reqId":"U47w62QZGZoALpdKwqAF","level":2,"time":"2018-12-10T05:01:33+00:00","remoteAddr":"60.191.38.77","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"60.191.38.77\" tried to access using \"178.1.231.253\" as host.","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko\/20100101 Firefox\/47.0","version":"13.0.8.2"}
{"reqId":"tJbFFZgQcDSh8VM8XOQj","level":2,"time":"2018-12-10T13:40:09+00:00","remoteAddr":"139.162.113.204","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"139.162.113.204\" tried to access using \"178.1.231.253\" as host.","userAgent":"HTTP Banner Detection (https:\/\/security.ipip.net)","version":"13.0.8.2"}
{"reqId":"igPRf3LHQCmBx8hOyMUL","level":3,"time":"2018-12-10T18:24:32+00:00","remoteAddr":"178.1.231.253","user":"root","app":"lib","method":"GET","url":"\/settings\/admin\/talk","message":"ResourceLocator can not find a web root (root: \/mnt\/nextcloud\/apps-appstore\/spreed, file: css\/spreed\/73df-d482-settings-admin.css, webRoot: , throw: true)","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"13.0.8.2"}

The output of your nginx log: cat error.log | tail

2018/12/10 07:34:48 [error] 11141#11141: *373 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/L5cmTO5M6327BygR3W5Gp-12JWeogIFVnMnPHGkJoiM HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/L5cmTO5M6327BygR3W5Gp-12JWeogIFVnMnPHGkJoiM"
2018/12/10 08:34:54 [error] 11141#11141: *407 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/e443x7gIx76CIkCxBoPu6hMpO_dXmsvCy5LFlFACTJA HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/e443x7gIx76CIkCxBoPu6hMpO_dXmsvCy5LFlFACTJA"
2018/12/10 09:35:00 [error] 11141#11141: *634 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/7DFvrRrnv59PG-6CHQBRpDgkDaFiCeXNzSVzaNg-zhM HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/7DFvrRrnv59PG-6CHQBRpDgkDaFiCeXNzSVzaNg-zhM"
2018/12/10 10:35:06 [error] 11141#11141: *660 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/OIsW-nmgp5UgDIZ5i1htc2rjdYtVDhbKS1rEHQLdhCk HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/OIsW-nmgp5UgDIZ5i1htc2rjdYtVDhbKS1rEHQLdhCk"
2018/12/10 11:35:12 [error] 11141#11141: *684 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/_3pHH2IYSeyYhEMeuNZOWmBXTqZxVrFOqG1wVFP1qME HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/_3pHH2IYSeyYhEMeuNZOWmBXTqZxVrFOqG1wVFP1qME"
2018/12/10 12:35:19 [error] 11141#11141: *851 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/fs5l1dyr_2GkBteetnOMCxowbm0YVIr6xGIGdJomdFo HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/fs5l1dyr_2GkBteetnOMCxowbm0YVIr6xGIGdJomdFo"
2018/12/10 13:35:25 [error] 11141#11141: *927 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/m4_MpKG1jg1HjAhUCXkZ00uqngwZeGiPGfbxiZIlHTU HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/m4_MpKG1jg1HjAhUCXkZ00uqngwZeGiPGfbxiZIlHTU"
2018/12/10 14:35:31 [error] 11141#11141: *992 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET/.well-known/acme-challenge/hQ2LLDD7UVvzvtgZoHltUrPVI5Pi9BBDrZAUYbxCoBQ HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/hQ2LLDD7UVvzvtgZoHltUrPVI5Pi9BBDrZAUYbxCoBQ"
2018/12/10 15:35:37 [error] 11141#11141: *1037 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET /.well-known/acme-challenge/32qZTnOKpbJROTuI4ycknQolUhBhr6Zsoy3o5u2xUWI HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/32qZTnOKpbJROTuI4ycknQolUhBhr6Zsoy3o5u2xUWI"
2018/12/10 19:27:51 [error] 588#588: *431 access forbidden by rule, client: 66.133.109.36, server: deleted, request: "GET /.well-known/acme-challenge/owYEuBHMCevNkpcPJITicrFd07U8_NTy2HipsW_U25E HTTP/1.1", host: "deleted", referrer: "deleted/.well-known/acme-challenge/owYEuBHMCevNkpcPJITicrFd07U8_NTy2HipsW_U25E"

The permissions for /usr/share/webapps/nextcloud :

total 116
drwxr-x---   12 nginx    www-data      4096 Dec  9 22:35 .
drwxr-xr-x    5 root     root          4096 Nov 25 17:32 ..
-rw-r-----    1 nginx    www-data      2714 Nov 27 08:06 .htaccess
-rw-r-----    1 nginx    www-data       163 Nov 27 08:06 .user.ini
drwxr-x---   33 nginx    www-data      4096 Dec  9 22:35 3rdparty
-rw-r-----    1 nginx    www-data     12063 Nov 27 08:06 AUTHORS
drwxr-x---    6 nginx    www-data      4096 Nov 25 16:34 apps
lrwxrwxrwx    1 nginx    www-data        23 Dec  9 22:35 apps-appstore -> /var/lib/nextcloud/apps
lrwxrwxrwx    1 nginx    www-data        14 Dec  9 22:35 config -> /etc/nextcloud
-rw-r-----    1 nginx    www-data      3593 Nov 27 08:06 console.php
drwxr-x---   16 nginx    www-data      4096 Dec  9 22:35 core
-rw-r-----    1 nginx    www-data      4944 Nov 27 08:06 cron.php
-rw-r-----    1 nginx    www-data       179 Nov 27 08:06 index.html
-rw-r-----    1 nginx    www-data      3664 Nov 27 08:06 index.php
drwxr-x---    6 nginx    www-data      4096 Dec  9 22:35 lib
-rw-r-----    1 nginx    www-data       283 Nov 27 08:06 occ
drwxr-x---    2 nginx    www-data      4096 Dec  9 22:35 ocs
drwxr-x---    2 nginx    www-data      4096 Dec  9 22:35 ocs-provider
-rw-r-----    1 nginx    www-data      3214 Nov 27 08:06 public.php
-rw-r-----    1 nginx    www-data      5370 Nov 27 08:06 remote.php
drwxr-x---    4 nginx    www-data      4096 Nov 25 16:34 resources
-rw-r-----    1 nginx    www-data        26 Nov 27 08:06 robots.txt
drwxr-x---   14 nginx    www-data      4096 Dec  9 22:35 settings
-rw-r-----    1 nginx    www-data      2274 Nov 27 08:06 status.php
drwxr-x---    3 nginx    www-data      4096 Nov 25 16:34 themes
drwxr-x---    2 nginx    www-data      4096 Dec  9 22:35 updater
-rw-r-----    1 nginx    www-data       362 Nov 27 08:06 version.php

The permissions for /mnt/nextcloud/data (external, mounted ZFS) :

total 1368drwxr-x---   16 nginx    www-data        20 Nov 28 20:32 .
drwxr-x---    7 nginx    www-data         7 Dec 10 15:50 ..
-rw-r--r--    1 nginx    www-data       324 Nov 28 20:32 .htaccess
-rwxr-x---    1 nginx    www-data         0 Dec  9 22:51 .ocdata
drwxr-x---    5 nginx    www-data         5 Oct 13 21:07 User1
drwxr-x---    5 nginx    www-data         5 Oct 13 21:07 User2
drwxr-x---    5 nginx    www-data         5 Oct 13 21:07 User3
drwxr-x---    7 nginx    www-data         7 Dec 10 19:24 User4
drwxr-x---    4 nginx    www-data         4 Oct 13 21:37 User5
drwxr-x---    5 nginx    www-data         5 Oct 13 21:37 User6
drwxr-x---    5 nginx    www-data         5 Oct 13 21:37 User7
drwxr-xr-x    5 nginx    www-data         5 Nov 18 21:37 appdata_oc04t8m97w05 # old installations
drwxr-xr-x    3 nginx    www-data         3 Nov 18 21:53 appdata_oci9vy5fxrb1
drwxr-xr-x    8 nginx    www-data         8 Nov 28 22:37 appdata_ocsy9ej1on3i
drwxr-x---   10 nginx    www-data        10 Oct 13 21:37 appdata_ocv7dvqgl529
drwxr-x---    9 nginx    www-data         9 Oct 13 21:37 appdata_ocvypiz3cexz
drwxr-x---    2 nginx    www-data         3 Nov 28 20:35 files_external
-rwxr-x---    1 nginx    www-data         0 Nov 28 20:32 index.html
-rwxr-x---    1 nginx    www-data   1276504 Oct 13 21:37 nextcloud.log
drwxr-x---    6 nginx    www-data         6 Oct 13 21:37 root

For the trusted domain error you should find a few topics here on the forum. I’m not sure about the other errors, perhaps one of the apps-folder has not the right permissions or files are missing. If you have installed apps, perhaps try to disable unused ones or failing ones, to see if the basic setup works.

Trusted domain errors:
The IP could come from LetsEncrypt, as it’s trying to access the .well-known directory. However, abuseipdb.com reports it as malicious, therefore I will wait a bit.

Apps folder:
Yes, that’s also my guess, but I need to know what folder has the wrong permissions and what should be the right one.

Basic apps:
I disabled all added apps from store, but the Files app is a basic one - so the error occurs in basic setup.

Well it seems that user “nginx” and group “www-data” is the correct permission :slight_smile:
Just run:
ls -al /usr/share/webapps/nextcloud/apps/

and post the output here.

Edit: the IP belongs to letsencrypt. I found it on one block list only:
https://ipindetail.com/ip-lookup/66.133.109.36.html

I’m pretty sure it was added to that list by mistake.

total 28
drwxr-x---    7 nginx    www-data      4096 Dec 12 10:21 .
drwxr-x---   12 nginx    www-data      4096 Dec  9 22:35 ..
drwxr-x---    9 nginx    www-data      4096 Nov 25 16:34 dav
drwxr-x---   10 nginx    www-data      4096 Nov 25 16:34 federatedfilesharing
drwxr-x---   11 nginx    www-data      4096 Dec  9 22:35 files
drwxr-x---    6 nginx    www-data      4096 Nov 25 16:34 provisioning_api
drwxr-xr-x    9 nginx    www-data      4096 Dec 12 10:21 spreed

So I add it to trusted domains or to my Proxmox firewall? Trusted domains doesn’t make any sense to me, and the container has no own firewall, so it has to be the host blocking it somehow…

Thanks for your guys help :slight_smile:

Not to the trusted domains. If it is the proxmox firewall who blocked the IP, then yes, whitelist that IP there.

These are all the folders under your app folder? The sharing app is totally missing. Maybe that’s the reason for the error message:

cannot be processed by the script '/apps/files_sharing/api/v1/sharees

Could you please go ahead and enable the usual (basic) apps?

I activated the Calendar and Contacts, those are the basic ones I think. Doesn’t make any difference though.

How comes the Sharing app is not installed - maybe a misconfigured package?
Is it possible to download this app manually?

I don’t know the alpine’s package manager. It’s very strange however. The default apps should actually be delivered with a standard installation.
I suggest to download the archive:
https://github.com/nextcloud/server/archive/v13.0.8.zip
or tar (however you prefer)
https://github.com/nextcloud/server/archive/v13.0.8.tar.gz

extract the archives content and copy the content of the apps folder (from nextcloud/apps/) into your apps folder - at least every folder which is missing in your current folder.

As admin user on the Web GUI go to the apps configuration and enable the needed apps - most importantly the sharing app - if not already enabled.

After doing so, the sharing icon appears in the Web GUI, but sharing is not possible. Log says

{"reqId":"uFgh5PZDZuXGiI92McxX","level":3,"time":"2018-12-12T12:46:36+00:00","remoteAddr":"178.1.231.253","user":"Jared","app":"index","method":"GET","url":"\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?format=json&path=%2FBilder&shared_with_me=true","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/ocs\\\/v2.php\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares) cannot be processed by the script '\\\/apps\\\/files_sharing\\\/api\\\/v1\\\/shares?format=json&path=%2FBilder&shared_w')\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/base.php(951): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#2 {main}\",\"File\":\"\\\/usr\\\/share\\\/webapps\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Request.php\",\"Line\":733}","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"13.0.8.2"}

Could it have something to do with my vhost configuration?

server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        server_name deleted;

        index index.php index.html index.htm;
#       disable_symlinks off;

        ssl_certificate /etc/letsencrypt/live/deleted/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/deleted/privkey.pem;

        add_header Strict-Transport-Security "max-age=31536000" always;
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;

        root /usr/share/webapps/nextcloud;

        fastcgi_hide_header X-Powered-By;

        client_max_body_size 10G;
        fastcgi_buffers 64 4K;

        gzip on;
        gzip_vary on;
        gzip_comp_level 4;
        gzip_min_length 256;
        gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
        gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }

        location / {
                rewrite ^ /index.php$request_uri;
#               try_files $uri $uri/ /index.html;
        }

        location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
                deny all;
        }

        location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
                deny all;
        }

        location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[13]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param HTTPS on;
                #Avoid sending the security headers twice
                fastcgi_param modHeadersAvailable true;
                fastcgi_param front_controller_active true;
                fastcgi_pass 127.0.0.1:9000;
#               fastcgi_index index.php;
                fastcgi_intercept_errors on;
                fastcgi_request_buffering off;
        }

        location ~ ^/(?:updater|ocs-provider)(?:$|/) {
                try_files $uri/ =404;
                index index.php;
        }

#       location ~ [^/]\.php(/|$) {
#               fastcgi_split_path_info ^(.+?\.php)(/.*)$;
#               if (!-f $document_root$fastcgi_script_name) {
#                       return 404;
#               }
#               fastcgi_pass 127.0.0.1:9000;
#               #fastcgi_pass unix:/run/php-fpm/socket;
#               fastcgi_index index.php;
#               include fastcgi.conf;
#       }

        location ~ \.(?:css|js)$ {
                try_files $uri /index.php$uri$is_args$args;
                add_header Cache-Control "public, max-age=15778463";
                add_header X-Content-Type-Options nosniff;
                add_header X-XSS-Protection "1; mode=block";
                add_header X-Robots-Tag none;
                add_header X-Download-Options noopen;
                add_header X-Permitted-Cross-Domain-Policies none;
        }

        location = /.well-known/carddav {
                return 301 $scheme://$host/remote.php/dav;
        }

        location = /.well-known/caldav {
                return 301 $scheme://$host/remote.php/dav;
        }

        location ~ \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
                try_files $uri /index.php$uri$is_args$args;
                access_log off;
        }
}

I forgot to mention that, but did you adapt file and folder permissions of the file_sharing app after moving the folder back in to nextcloud/apps/?
Can you please provide the output of:
ls -l /usr/share/webapps/nextcloud/apps/
ls -l /usr/share/webapps/nextcloud/apps/files_sharing/

Could also run the following commands and provide the output please?
sudo -u nginx php /usr/share/webapps/nextcloud/occ app:list