nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.63k stars 3.99k forks source link

[Bug]: I can't see my files in the root of my accounts after NC upgrade (27) #40322

Open vincib opened 1 year ago

vincib commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

Quickly: After the upgrade from NC25 to 26, (I later upgraded to NC27 to see if the bug was still there, it still is) I can't see my files in the root of my accounts, I only see the content of a folder another local user shared to me.

Details: my user is benjamin, and local user jean-pierre shared (long ago) 2 folders with me: "numerisation" and "videos" Since NC26 upgrade, I am now seeing "numerisation" folder content at the root of my account instead of my own files. I asked jean-pierre to stop sharing this with me, and now I see "video" folders content from jean-pierre at the root of my account instead of my own files...

I found that in oc_mounts table I had the following entry :

| 113 | 23 | 659747 | benjamin | /benjamin/files/ | NULL | OCA\Files_Sharing\MountProvider |

659747 being the fileid of the "numerisation" folder in jean-pierre files.

after jean-pierre stopped sharing, I now have this entry in oc_mounts :

| 126 | 23 | 569282 | benjamin | /benjamin/files/ | NULL | OCA\Files_Sharing\MountProvider |

569282 being the fileid of jean-pierre "videos" folder ...

of course, in oc_mounts, I also have this entry,

| 1 | 1 | 1 | benjamin | /benjamin/ | NULL | OC\Files\Mount\LocalHomeMountProvider |

(which is normal)

I looked at a MySQL backup from before the upgrade to NC25/26/27, and I found that the entry 113 in oc_mounts had "/benjamin/files/numerisations/" as mount_point, not "/benjamin/files/"

If I change (manually in the DB) it back to the old value, and reload a NC page, it is changed back to "/benjamin/files/"

Steps to reproduce

I am not able to reproduce it on a new NC, sorry

Expected behavior

I expect to find my own files at the root of my account, not the content of a shared folder.

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.sonntag.fr",
            "cloud.petrichoeur.com",
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.sonntag.fr",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "theme": "",
        "loglevel": 0,
        "maintenance": false,
        "trashbin_retention_obligation": "auto",
        "htaccess.RewriteBase": "\/",
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "calendar",
            "sharelisting",
            "twofactor_totp"
        ],
        "default_language": "fr",
        "simpleSignUpLink.shown": false,
        "mysql.utf8mb4": true,
        "encryption.key_storage_migrated": false,
        "memcached_servers": [
            [
                "\/tmp\/ben.memcached.sock",
                0
            ]
        ],
        "memcache.local": "\\OC\\Memcache\\Memcached",
        "memcache.distributed": "\\OC\\Memcache\\Memcached",
        "default_phone_region": "FR"
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - bbb: 2.5.0
  - calendar: 4.4.4
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.3.2
  - contactsinteraction: 1.8.0
  - dav: 1.27.0
  - drawio: 2.1.2
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_external: 1.19.0
  - files_fulltextsearch: 27.0.1
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - fulltextsearch: 27.0.1
  - impersonate: 1.14.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - richdocuments: 8.1.1
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - webapppassword: 23.6.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0 (installed 2.4.0)
  - dashboard: 7.7.0 (installed 7.3.0)
  - encryption: 2.15.0 (installed 2.4.0)
  - fulltextsearch_elasticsearch: 27.0.2 (installed 27.0.2)
  - groupfolders: 15.0.2 (installed 15.0.2)
  - mail: 3.3.1 (installed 3.2.6)
  - nextcloud_announcements: 1.16.0 (installed 1.12.0)
  - onlyoffice: 8.2.0 (installed 8.2.0)
  - sharelisting: 1.1.1 (installed 1.1.1)
  - spreed: 17.0.3 (installed 17.0.3)
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0 (installed 6.4.1)
  - updatenotification: 1.17.0 (installed 1.13.0)
  - user_ldap: 1.17.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"mE8G5p4PEbtzZd94vjoA","level":0,"time":"2023-09-07T08:02:02+00:00","remoteAddr":"91.194.61.238","user":"isabelle","app":"webapppassword","method":"PROPFIND","url":"/remote.php/dav/files/isabelle/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.7.3git (build 13809) (Nextcloud, osx-22.2.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"27.0.2.1","data":{"app":"webapppassword"}}
{"reqId":"mE8G5p4PEbtzZd94vjoA","level":3,"time":"2023-09-07T08:02:02+00:00","remoteAddr":"91.194.61.238","user":"isabelle","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/isabelle/","message":"foreach() argument must be of type array|object, bool given at /var/alternc/html/b/ben/cloud/pub/apps/workflowengine/lib/AppInfo/Application.php#75","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.7.3git (build 13809) (Nextcloud, osx-22.2.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"p4oQwBaKrAzpSSbz7edr","level":0,"time":"2023-09-07T08:02:04+00:00","remoteAddr":"81.66.210.128","user":"benjamin","app":"webdav","method":"HEAD","url":"/remote.php/dav/files/benjamin/Photos/2023/09/20230906_114455.jpg","message":"File with name //Photos could not be located","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.2.1","exception":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name //Photos could not be located","Code":0,"Trace":[{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Tree.php","line":73,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Tree.php","line":73,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Tree.php","line":73,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":76,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpHead","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/alternc/html/b/ben/cloud/pub/remote.php","line":172,"args":["/var/alternc/html/b/ben/cloud/pub/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/alternc/html/b/ben/cloud/pub/apps/dav/lib/Connector/Sabre/Directory.php","Line":227,"message":"File with name //Photos could not be located","exception":{},"CustomMessage":"File with name //Photos could not be located"}}

Additional info

This is a very old (it was an owncloud 8 and upgraded since to NC 10 to 27 as time goes by) installation. I suspect this could be linked to #37473

vincib commented 1 year ago

More informations :

~/cloud/pub$ php8.0 occ info:file benjamin/files/
files
  fileid: 569282
  mimetype: httpd/unix-directory
  modified: 7 septembre 2023 07:27:12 UTC+0
  not encrypted
  size: 64.7 MB
  etag: e8643acaed0fac81fe855364b935cfc5
  children: 4 (use --children option to list)
  mounted at: /benjamin/files/
The following users have access to the file
jean-pierre:
  /jean-pierre/files/Videos: full permissions
    home storage
benjamin:
  /benjamin/files: full permissions
    shared by jean-pierre owned by jean-pierre
~/cloud/pub$ php8.0 occ info:file astrid/files/
files
  fileid: 300513
  mimetype: httpd/unix-directory
  modified: 17 juin 2023 14:16:33 UTC+0
  not encrypted
  size: 18.7 GB
  etag: 648dc0413940c
  children: 6 (use --children option to list)
  mounted at: /astrid/files/
The following users have access to the file
benjamin:
  /benjamin/files/partage/Astrid: full permissions
    home storage
astrid:
  /astrid/files: full permissions
    shared by benjamin owned by benjamin
vincib commented 1 year ago

Follow-up of my research on this bug:

I traced a simple call to "php8.0 occ info:file /benjamin/files/" (on the original NC27 + file_sharing 1.19.0) and it does the following SQL queries:

                691511 Query    START TRANSACTION
                691511 Query    INSERT INTO `oc_mounts` (`storage_id`,`root_id`,`user_id`,`mount_point`,`mount_id`,`mount_provider_class`) SELECT '1','1','benjamin','/benjamin/',NULL,'OC\\Files\\Mount\\LocalHome
MountProvider' FROM `oc_mounts` WHERE `root_id` = '1' AND `user_id` = 'benjamin' AND `mount_point` = '/benjamin/' HAVING COUNT(*) = 0
                691511 Query    INSERT INTO `oc_mounts` (`storage_id`,`root_id`,`user_id`,`mount_point`,`mount_id`,`mount_provider_class`) SELECT '23','569282','benjamin','/benjamin/files/',NULL,'OCA\\Files_Shar
ing\\MountProvider' FROM `oc_mounts` WHERE `root_id` = '569282' AND `user_id` = 'benjamin' AND `mount_point` = '/benjamin/files/' HAVING COUNT(*) = 0
                691511 Query    DELETE FROM `oc_mounts` WHERE (`user_id` = 'benjamin') AND (`root_id` = 540095) AND (`mount_point` = '/benjamin/files/Geoffrey/')
                691511 Query    DELETE FROM `oc_mounts` WHERE (`user_id` = 'benjamin') AND (`root_id` = 569282) AND (`mount_point` = '/benjamin/files/Videos/')
                691511 Query    DELETE FROM `oc_mounts` WHERE (`user_id` = 'benjamin') AND (`root_id` = 659747) AND (`mount_point` = '/benjamin/files/numerisations/')
                691511 Query    COMMIT
vincib commented 1 year ago

okay, following up :)

MariaDB [ben_oc]> select * from oc_share where uid_owner = 'jean-pierre';
| id  | share_type | share_with | uid_owner   | parent | item_type | item_source | item_target | file_source | file_target | permissions | stime      | accepted | expiration | token           | mail_send | uid_initiator | share_name | password | password_by_talk | note | hide_download | label | attributes | password_expiration_time |
|  57 |          0 | anne-marie | jean-pierre |   NULL | folder    | 187882      | NULL        |      187882 | /Photos     |          31 | 1551000308 |        1 | NULL       | NULL            |         0 | jean-pierre   | NULL       | NULL     |                0 | NULL |             0 | NULL  | NULL       | NULL                     |
| 214 |          0 | benjamin   | jean-pierre |   NULL | folder    | 569282      | NULL        |      569282 | /Videos     |          31 | 1674381341 |        1 | NULL       | NULL            |         0 | jean-pierre   | NULL       | NULL     |                0 | NULL |             0 | NULL  | NULL       | NULL                     |
herrmannsdorfer commented 1 year ago

Same symptoms here with a 25.0.10 install happening without major updates. User reports missing "all files" except his shares in "shareoverview" and deleted files in "trashbin" over night. Disabling File Sharing app brings back all files in root. With File Sharing app enabled and trying to list all files in root or via browser refresh of the page there is the following log entry - hope that helps debugging:

[no app in context] Error: OCP\Files\StorageNotAvailableException: File by id 8570 not found at <<closure>>

 0. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Jail.php line 234
    OC\Files\Storage\FailedStorage->file_exists()
 1. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 224
    OC\Files\Storage\Wrapper\Jail->file_exists()
 2. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 224
    OC\Files\Storage\Wrapper\Wrapper->file_exists()
 3. /var/www/nextcloud/lib/private/Files/View.php line 1350
    OC\Files\Storage\Wrapper\Wrapper->file_exists()
 4. /var/www/nextcloud/lib/private/Files/View.php line 1394
    OC\Files\View->getCacheEntry()
 5. /var/www/nextcloud/lib/private/Files/Node/Root.php line 202
    OC\Files\View->getFileInfo()
 6. <<closure>>
    OC\Files\Node\Root->get()
 7. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 73
    call_user_func_array()
 8. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 150
    OC\Files\Node\LazyFolder->__call()
 9. /var/www/nextcloud/apps/files_accesscontrol/lib/Operation.php line 290
    OC\Files\Node\LazyFolder->get()
10. /var/www/nextcloud/apps/files_accesscontrol/lib/Operation.php line 87
    OCA\FilesAccessControl\Operation->getNode()
11. /var/www/nextcloud/apps/files_accesscontrol/lib/CacheWrapper.php line 60
    OCA\FilesAccessControl\Operation->checkFileAccess()
12. /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 87
    OCA\FilesAccessControl\CacheWrapper->formatCacheEntry()
13. /var/www/nextcloud/lib/private/Files/Node/Root.php line 464
    OC\Files\Cache\Wrapper\CacheWrapper->get()
14. <<closure>>
    OC\Files\Node\Root->OC\Files\Node\{closure}("*** sensitive parameters replaced ***")
15. /var/www/nextcloud/lib/private/Files/Node/Root.php line 462
    array_map()
16. /var/www/nextcloud/lib/private/Files/Node/LazyUserFolder.php line 67
    OC\Files\Node\Root->getByIdInPath()
17. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 209
    OC\Files\Node\LazyUserFolder->getById()
18. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 873
    OCA\Files_Sharing\Controller\ShareAPIController->formatShare()
19. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 1020
    OCA\Files_Sharing\Controller\ShareAPIController->getSharedWithMe()
20. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 992
    OCA\Files_Sharing\Controller\ShareAPIController->getFormattedShares()
21. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Files_Sharing\Controller\ShareAPIController->getShares()
22. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
23. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
24. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
25. /var/www/nextcloud/ocs/v1.php line 64
    OC\Route\Router->match()

Caused by:

OCP\Files\NotFoundException: File by id 8570 not found at <<closure>>

 0. /var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php line 532
    OCA\Files_Sharing\SharedStorage->init()
 1. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Jail.php line 234
    OCA\Files_Sharing\SharedStorage->getWrapperStorage()
 2. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 224
    OC\Files\Storage\Wrapper\Jail->file_exists()
 3. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 224
    OC\Files\Storage\Wrapper\Wrapper->file_exists()
 4. /var/www/nextcloud/lib/private/Files/View.php line 1350
    OC\Files\Storage\Wrapper\Wrapper->file_exists()
 5. /var/www/nextcloud/lib/private/Files/View.php line 1394
    OC\Files\View->getCacheEntry()
 6. /var/www/nextcloud/lib/private/Files/Node/Root.php line 202
    OC\Files\View->getFileInfo()
 7. <<closure>>
    OC\Files\Node\Root->get()
 8. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 73
    call_user_func_array()
 9. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 150
    OC\Files\Node\LazyFolder->__call()
10. /var/www/nextcloud/apps/files_accesscontrol/lib/Operation.php line 290
    OC\Files\Node\LazyFolder->get()
11. /var/www/nextcloud/apps/files_accesscontrol/lib/Operation.php line 87
    OCA\FilesAccessControl\Operation->getNode()
12. /var/www/nextcloud/apps/files_accesscontrol/lib/CacheWrapper.php line 60
    OCA\FilesAccessControl\Operation->checkFileAccess()
13. /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 87
    OCA\FilesAccessControl\CacheWrapper->formatCacheEntry()
14. /var/www/nextcloud/lib/private/Files/Node/Root.php line 464
    OC\Files\Cache\Wrapper\CacheWrapper->get()
15. <<closure>>
    OC\Files\Node\Root->OC\Files\Node\{closure}("*** sensitive parameters replaced ***")
16. /var/www/nextcloud/lib/private/Files/Node/Root.php line 462
    array_map()
17. /var/www/nextcloud/lib/private/Files/Node/LazyUserFolder.php line 67
    OC\Files\Node\Root->getByIdInPath()
18. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 209
    OC\Files\Node\LazyUserFolder->getById()
19. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 873
    OCA\Files_Sharing\Controller\ShareAPIController->formatShare()
20. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 1020
    OCA\Files_Sharing\Controller\ShareAPIController->getSharedWithMe()
21. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php line 992
    OCA\Files_Sharing\Controller\ShareAPIController->getFormattedShares()
22. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Files_Sharing\Controller\ShareAPIController->getShares()
23. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
24. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
25. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
26. /var/www/nextcloud/ocs/v1.php line 64
    OC\Route\Router->match()

GET /nextcloud/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json&shared_with_me=true&include_tags=true
from 188.103.6.189 by BE084BC3-B4D3-4380-B9B3-07FECC66B9F3 at 2023-09-07T17:36:19+02:00
vincib commented 1 year ago

I found a solution (partially)

commented out line 109-112 of apps/files_sharing/lib/SharedMount.php disabling the cache in verifyMountPoint()

when I do that, the oc_mount is filled properly and the nextcloud files are now all properly visible

ALSO, if I disable my MEMCACHED configuration in config/config.php, it works TOO...

vincib commented 12 months ago

replaced memcached by redis, uncommented the cache in SharedMount.php, and everything is working fine and quick

don't know what was wrong with my config.php, but maybe this deserve a line or two in the documentation if I did something wrong? ;)

joshtrichards commented 12 months ago

In theory Memcached should have been fine with the way you configured it AFAIK (assuming this is a standalone server). Personally I get the sense Memcached isn't used very often in new NC installations these days however.

What versions, specifically, of these do you have in this installation?

vincib commented 12 months ago
ii  php8.0-memcached                      3.2.0++-1+0~20230622.54+debian10~1.gbp8f3995                               amd64        memcached extension module for PHP, uses libmemcached
ii  memcached                             1.5.6-1.1                                                                  amd64        high-performance memory object caching system
ii  libmemcached11:amd64                  1.0.18-4.2                                                                 amd64        C and C++ client library to the memcached server

memcached launched with -m 64 -s /tmp/ben.memcached.sock -u ben on a debian 10.13 (buster, I know, quite an oldstable :) ) but with php-sury packages for php.

herrmannsdorfer commented 12 months ago

I found a solution (partially)

commented out line 109-112 of apps/files_sharing/lib/SharedMount.php disabling the cache in verifyMountPoint()

when I do that, the oc_mount is filled properly and the nextcloud files are now all properly visible

ALSO, if I disable my MEMCACHED configuration in config/config.php, it works TOO...

We are not using memcached and disabling the cache in verifyMountPoint() does not help either. Unfortunately we experience the same symptoms but for a different reason as your workaround does not apply to our setup. Disabling file sharing is not an option. I will open a new issue for that. Sorry for the noise.

joshtrichards commented 10 months ago

So interestingly came across another party where memcached was the culprit on the Forum today:

https://help.nextcloud.com/t/this-is-the-unsupported-community-build-of-nextcloud-message-for-small-install/172263/8

Noting here simply for future reference for now.