Can't share multiple subfolders within shared folder

Nextcloud version (eg, 20.0.5): 21.0.4
Operating system and version (eg, Ubuntu 20.04): CentOS 8.4
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.14.1
PHP version (eg, 7.4): PHP-fpm 7.4.22

The issue you are facing:

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

Steps to replicate it:

  1. Create shared folder and group for access
  2. Fill with subfolders
  3. Share multiple subfolders with users who aren’t groupmember

The output of your Nextcloud log in Admin > Logging:

{“reqId”:“E3qZEOt2ehfwQzSsnzuM”,“level”:3,“time”:“2021-09-01T23:15:21+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“username”,“app”:“text”,“method”:“GET”,“url”:"/ocs/v2.php/apps/text/workspace?path=%2FShared%2F2.+Offertes",“message”:{“Exception”:“OCP\Files\StorageNotAvailableException”,“Message”:“File with id “124185” has not been found.”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Jail.php",“line”:238,“function”:“file_exists”,“class”:“OC\Files\Storage\FailedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:228,“function”:“file_exists”,“class”:“OC\Files\Storage\Wrapper\Jail”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1345,“function”:“file_exists”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1394,“function”:“getCacheEntry”,“class”:“OC\Files\View”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Root.php",“line”:201,“function”:“getFileInfo”,“class”:“OC\Files\View”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Folder.php",“line”:149,“function”:“get”,“class”:“OC\Files\Node\Root”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Folder.php",“line”:158,“function”:“get”,“class”:“OC\Files\Node\Folder”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/text/lib/Service/WorkspaceService.php",“line”:32,“function”:“nodeExists”,“class”:“OC\Files\Node\Folder”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/text/lib/Controller/WorkspaceController.php",“line”:118,“function”:“getFile”,“class”:“OCA\Text\Service\WorkspaceService”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:218,“function”:“folder”,“class”:“OCA\Text\Controller\WorkspaceController”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:127,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/App.php",“line”:157,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Route/Router.php",“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::"},{“file”:"/var/www/nextcloud/ocs/v1.php",“line”:63,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/nextcloud/ocs/v2.php",“line”:24,“args”:["/var/www/nextcloud/ocs/v1.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Files/Storage/FailedStorage.php",“Line”:114,“Hint”:“Storage is temporarily not available”,“Previous”:{“Exception”:“OCP\Files\NotFoundException”,“Message”:“File with id “124185” has not been found.”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php",“line”:131,“function”:“getPath”,“class”:“OC\Files\View”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php",“line”:488,“function”:“init”,“class”:“OCA\Files_Sharing\SharedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:498,“function”:“getWrapperStorage”,“class”:“OCA\Files_Sharing\SharedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php",“line”:169,“function”:“instanceOfStorage”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupquota/lib/AppInfo/Application.php",“line”:65,“function”:“instanceOfStorage”,“class”:“OCA\Files_Sharing\SharedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/StorageFactory.php",“line”:101,“function”:“OCA\GroupQuota\AppInfo\{closure}”,“class”:“OCA\GroupQuota\AppInfo\Application”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/Files/Mount/MountPoint.php",“line”:150,“function”:“wrap”,“class”:“OC\Files\Storage\StorageFactory”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Mount/MountPoint.php",“line”:174,“function”:“createStorage”,“class”:“OC\Files\Mount\MountPoint”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1417,“function”:“getStorage”,“class”:“OC\Files\Mount\MountPoint”,“type”:"->"},{“function”:“OC\Files\{closure}”,“class”:“OC\Files\View”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1419,“function”:“array_filter”},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Node.php",“line”:100,“function”:“getFileInfo”,“class”:“OC\Files\View”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Node.php",“line”:362,“function”:“getFileInfo”,“class”:“OC\Files\Node\Node”,“type”:"->"},{“function”:“getMountPoint”,“class”:“OC\Files\Node\Node”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",“line”:66,“function”:“call_user_func_array”},{“file”:"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",“line”:332,“function”:"__call",“class”:“OC\Files\Node\LazyFolder”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupfolders/lib/ACL/ACLManager.php",“line”:49,“function”:“getMountPoint”,“class”:“OC\Files\Node\LazyFolder”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupfolders/lib/ACL/ACLManager.php",“line”:75,“function”:“getRootStorageId”,“class”:“OCA\GroupFolders\ACL\ACLManager”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupfolders/lib/ACL/ACLManager.php",“line”:113,“function”:“getRules”,“class”:“OCA\GroupFolders\ACL\ACLManager”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php",“line”:176,“function”:“getACLPermissionsForPath”,“class”:“OCA\GroupFolders\ACL\ACLManager”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php",“line”:122,“function”:“getMount”,“class”:“OCA\GroupFolders\Mount\MountProvider”,“type”:"->"},{“function”:“OCA\GroupFolders\Mount\{closure}”,“class”:“OCA\GroupFolders\Mount\MountProvider”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php",“line”:102,“function”:“array_map”},{“file”:"/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php",“line”:109,“function”:“getMountsForUser”,“class”:“OCA\GroupFolders\Mount\MountProvider”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Filesystem.php",“line”:452,“function”:“addMountForUser”,“class”:“OC\Files\Config\MountProviderCollection”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php",“line”:129,“function”:“initMountPoints”,“class”:“OC\Files\Filesystem”,“type”:"::"},{“file”:"/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php",“line”:488,“function”:“init”,“class”:“OCA\Files_Sharing\SharedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:498,“function”:“getWrapperStorage”,“class”:“OCA\Files_Sharing\SharedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php",“line”:169,“function”:“instanceOfStorage”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/groupquota/lib/AppInfo/Application.php",“line”:65,“function”:“instanceOfStorage”,“class”:“OCA\Files_Sharing\SharedStorage”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/StorageFactory.php",“line”:101,“function”:“OCA\GroupQuota\AppInfo\{closure}”,“class”:“OCA\GroupQuota\AppInfo\Application”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/Files/Mount/MountPoint.php",“line”:150,“function”:“wrap”,“class”:“OC\Files\Storage\StorageFactory”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Mount/MountPoint.php",“line”:174,“function”:“createStorage”,“class”:“OC\Files\Mount\MountPoint”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1417,“function”:“getStorage”,“class”:“OC\Files\Mount\MountPoint”,“type”:"->"},{“function”:“OC\Files\{closure}”,“class”:“OC\Files\View”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1419,“function”:“array_filter”},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Root.php",“line”:201,“function”:“getFileInfo”,“class”:“OC\Files\View”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/Root.php",“line”:382,“function”:“get”,“class”:“OC\Files\Node\Root”,“type”:"->"},{“function”:“getUserFolder”,“class”:“OC\Files\Node\Root”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",“line”:66,“function”:“call_user_func_array”},{“file”:"/var/www/nextcloud/lib/private/Files/Node/LazyRoot.php",“line”:41,“function”:"__call",“class”:“OC\Files\Node\LazyFolder”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/text/lib/Controller/WorkspaceController.php",“line”:115,“function”:“getUserFolder”,“class”:“OC\Files\Node\LazyRoot”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:218,“function”:“folder”,“class”:“OCA\Text\Controller\WorkspaceController”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:127,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/App.php",“line”:157,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Route/Router.php",“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::"},{“file”:"/var/www/nextcloud/ocs/v1.php",“line”:63,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/nextcloud/ocs/v2.php",“line”:24,“args”:["/var/www/nextcloud/ocs/v1.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Files/View.php",“Line”:1773},“CustomMessage”:“Failed to get workspace file”},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 OPR/78.0.4093.184”,“version”:“21.0.4.1”,“id”:“61300cfa5d70e”}

I have a shared folder and group for access.
Groupmembers can access subfolders and files without problems.

Some other users may only access certain subfolders.
Therefor they’re not a groupmember but subfolders are shared by a groupmember.

All shared folders do show up at the user as shared folders.
But only the first shared folder is fully filled and usable.
Other folders show as empty with a notice that the user has no permission to upload or create files and the log says the folders can’t be found.

When I unshare the first folder it obviously disappears and the 2nd shared folder becomes usable.
Other shared folder remain empty and unusable and according to the log not found.

This goes per groupmember who shares subfolders.
A workaround could be to share each subfolder by a different groupmember.
But because groupmembers can only manage their own shares there’s just one groupmember appointed to manage shares.
And there are more subfolders to share then there are groupmembers.
So the workaround is realy not an option.