Nextcloud 22 - restrict users to only share with users in their groups option

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

Nextcloud version (eg, 20.0.5):22.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Server version: Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.4): PHP 7.4.3 (cli)

The issue you are facing:

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

Steps to replicate it:

The option in Sharing configuration:

  • restrict users to only share with users in their groups
    Is uncheked
  1. Trying to share folder with LDAP Groups or LDAP Users that not in the same group
  2. LDAP Groups/Users is not showed at the sharing field

The output of your Nextcloud log in Admin > Logging: No errors reported

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

<?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, ), ), 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'nextcloud-redis', 'password' => '', 'port' => 6379, ), 'instanceid' => 'oc3rbsp2lttz', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => 'donmain', ), 'datadirectory' => '/srv/dados/data', 'dbtype' => 'mysql', 'version' => '22.0.0.11', 'overwrite.cli.url' => 'http://domain', 'dbname' => 'nextcloud', 'dbhost' => 'nextcloud-mariadb', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', 'dbpassword' => '', 'installed' => true, 'trusted_proxies' => array ( 1 => '127.0.0.1', ), 'overwritehost' => 'domain', 'overwriteprotocol' => 'https', 'loglevel' => 2, 'default_phone_region' => 'BR', 'log.condition' => array ( 'apps' => array ( 0 => 'admin_audit', ), ), 'maintenance' => false, 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'ssl', 'mail_sendmailmode' => 'smtp', 'mail_from_address' => 'id', 'mail_domain' => 'TLD', 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpauth' => 1, 'mail_smtphost' => 'domain', 'mail_smtpport' => '465', 'mail_smtpname' => 'mail', 'mail_smtppassword' => 'pass', 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory', 'app_install_overwrite' => array ( 0 => 'files_clipboard', 1 => 'ojsxc', ), ); Images will be posted later

Enviando: 1.png…

Have you tried entering the entire username yourself, rather than using the auto-completion?
I occasionally have a similar issue group names rather than user names - only some of them will auto-complete at any given time, and the others have to be manually entered.

Yes, I´m tried, and don´t work too.

One other potential problem I can think of - have all of the users signed into Nextcloud at least once? I seem to remember LDAP users only existing (as far as Nextcloud can tell) after they first sign in.
If that’s not it, then I’m afraid I’m out of my depth.

If a log with a LDAP user show the Group and the users of same group, but not show the users from other groups or other groups.
Even the option “restrict users to only share with users in their groups option” is unchecked