Can't unshare Files/Folders shared with Active Directory groups

Hi.

I’m experiencing a problem with the “unshare” option.

Nextcloud version 12.0.0
Ubuntu Server 16.04 64 bits
Apache/2.4.18
PHP 7.0.18

Problem:

  • “User A” share a folder eg. “Project” with an Active Directory group named “Team”;
  • “User B” belongs to AD group “Team” and the folder “Project” appears in your list;
  • “User B” try “Unshare” this folder but it is not possible. On top of the screen the following message is shown: "
    Error deleting file “Project”.

PS: When the group is a local group, the unsharing works normally.


The output of my Nextcloud log in Admin > Logging:

Fatal webdav OC\Share20\Exception\ProviderException: Recipient not in receiving group
/var/www/html/nextcloud/lib/private/Share20/Manager.php - line 875: OC\Share20\DefaultShareProvider->deleteFromSelf(Object(OC\Share20\Share), ‘user.b’)
/var/www/html/nextcloud/apps/files_sharing/lib/SharedStorage.php - line 402: OC\Share20\Manager->deleteFromSelf(Object(OC\Share20\Share), ‘usr.b’)
[internal function] OCA\Files_Sharing\SharedStorage->unshareStorage()
/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 501: call_user_func_array(Array, Array)
/var/www/html/nextcloud/apps/files_sharing/lib/SharedMount.php - line 217: OC\Files\Storage\Wrapper\Wrapper->__call(‘unshareStorage’, Array)
/var/www/html/nextcloud/lib/private/Files/View.php - line 290: OCA\Files_Sharing\SharedMount->removeMount()
/var/www/html/nextcloud/lib/private/Files/View.php - line 345: OC\Files\View->removeMount(Object(OCA\Files_Sharing\SharedMount), ‘/usr.b/file…’)
/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 303: OC\Files\View->rmdir(’/Project’)
/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 179: OCA\DAV\Connector\Sabre\Directory->delete()
/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 287: Sabre\DAV\Tree->delete(‘Project’)
[internal function] Sabre\DAV\CorePlugin->httpDelete(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit(‘method DELETE’, Array)
/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 71: Sabre\DAV\Server->exec()
/var/www/html/nextcloud/remote.php - line 162: require_once(’/var/www/html/n…’)
{main}


The output of my config.php file:

<?php $CONFIG = array ( 'instanceid' => 'instanceid', 'passwordsalt' => 'passwordsalt', 'secret' => 'secret', 'trusted_domains' => array ( 0 => 'IP', ), 'datadirectory' => '/mnt/ncdata/data', 'overwrite.cli.url' => 'http://IP/nextcloud', 'dbtype' => 'pgsql', 'version' => '12.0.0.29', 'dbname' => 'nextcloud', 'dbhost' => 'IP_DB_HOST', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_admin', 'dbpassword' => 'dbpassword', 'logtimezone' => 'UTC', 'installed' => true, 'updater.release.channel' => 'stable', 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', ); ---------- The output of my Apache log in `/var/log/apache2/access.log`: [14/Jun/2017:16:06:59 -0300] "DELETE /nextcloud/remote.php/webdav/Project HTTP/1.1" 500 1041 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0" --- Cheers

Hi, just to let you know, I’m having the same problem!
It seems Nextcloud is not always able to recognize group membership for AD groups:
Also in admin->Users , AD groups seems always to be empty, although under “everyone” correct membership is reported for each user.

Nextcloud 12.02
Centos 7
Apache 2.4.6
php 7.1.8

[EDIT]:
Also moving a shared folder isn’t possible under this circumstances:

  • “User A” share a folder “Project” with an AD group “Team”
  • “User B” is a member of AD group “Team” and the folder “Project” appears in his list
  • “User B” tries moving the folder Project in an other folder e.g. “shares” but this is not possible. The following message is displayed: Could not move “Project”
  • When shared with a local group, moving works as expected

Regards

1 Like

I currently got an issue report and believe the same is true for the general LDAP setup.