Share issue from groupfolders

Nextcloud version: 20.0.8.1
Operating system and version (eg, Ubuntu 20.04): Docker
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.4): 7.4

The issue you are facing:
The second share from within two seperate groupfolders to the same group results in the latter being 0KB. It is always the folder that is shared second, which ends up being empty…

Now I ask myself, is this maybe an issue with using groupfolders and shares together? Might this be a bug?

(See replication steps)

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

Steps to replicate it:

  1. Create 2 groupfolders (1 and 2) with full permissions for userX
  2. User X shares a subfolder (SF1 in 1 and SF2 in 2) in each of these with group G (containing users A and B)
  3. Users A and B get get the SF1 from 1 correctly in their files app, but the SF2 is 0KB and thus empty

(all actions done using impersonate)


The output of your Nextcloud log in Admin > Logging:
Nothing besides user switching

The output of your config.php file:

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '20.0.8.1',
  'overwrite.cli.url' => '',
  'dbname' => '',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'trusted_proxies' => 
  array (
    0 => '',
  ),
  'overwritehost' => '',
  'overwriteprotocol' => 'https',
  'mail_from_address' => 'no-reply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => ',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '',
  'mail_smtpsecure' => '',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'maintenance' => false,
  'loglevel' => 2,
);

Databse oc_share:

+----+------------+---------------+-----------------------------------------------------------------------------------------------------+-----------------+-----------------+--------+-----------+-------------+-------------+-------------+--------------------------------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+
| id | share_type | share_with    | password                                                                                            | uid_owner       | uid_initiator   | parent | item_type | item_source | item_target | file_source | file_target                          | permissions | stime      | accepted | expiration | token           | mail_send | share_name | password_by_talk | note | hide_download | label |
+----+------------+---------------+-----------------------------------------------------------------------------------------------------+-----------------+-----------------+--------+-----------+-------------+-------------+-------------+--------------------------------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+
| 84 |          1 | G             | NULL                                                                                                | X               | X               |   NULL | folder    | 1135        | NULL        |        1135 | /SF1                                 |          31 | 1616865422 |        0 | NULL       | NULL            |         0 | NULL       |                0 | NULL |             0 | NULL  |
| 85 |          2 | A             | NULL                                                                                                | X               | X               |     84 | folder    | 1135        | NULL        |        1135 | /SF1                                 |          31 | 1616865422 |        1 | NULL       | NULL            |         0 | NULL       |                0 | NULL |             0 | NULL  |
| 86 |          2 | B             | NULL                                                                                                | X               | X               |     84 | folder    | 1135        | NULL        |        1135 | /SF1                                 |          31 | 1616865422 |        1 | NULL       | NULL            |         0 | NULL       |                0 | NULL |             0 | NULL  |
| 87 |          1 | G             | NULL                                                                                                | X               | X               |   NULL | folder    | 1182        | NULL        |        1182 | /SF2                                 |          31 | 1616865445 |        0 | NULL       | NULL            |         0 | NULL       |                0 | NULL |             0 | NULL  |
| 88 |          2 | A             | NULL                                                                                                | X               | X               |     87 | folder    | 1182        | NULL        |        1182 | /SF2                                 |          31 | 1616865445 |        1 | NULL       | NULL            |         0 | NULL       |                0 | NULL |             0 | NULL  |
| 89 |          2 | B             | NULL                                                                                                | X               | X               |     87 | folder    | 1182        | NULL        |        1182 | /SF2                                 |          31 | 1616865445 |        1 | NULL       | NULL            |         0 | NULL       |                0 | NULL |             0 | NULL  |
+----+------------+---------------+-----------------------------------------------------------------------------------------------------+-----------------+-----------------+--------+-----------+-------------+-------------+-------------+--------------------------------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+

Thanks for any clues!