Proplems removing orphaned folder grants

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Posts: 6
Joined: Mon Oct 31, 2016 12:49 pm
Location: Germany

Proplems removing orphaned folder grants

Postby derbärtigefrytz » Thu Sep 10, 2020 4:17 pm

Hello everybody.
Some of my users have orphaned folder grants. They granted folder rights to a user, that does not exist. (See below, for reasons.)
The grant shows up in the folder properties of the web client without a name and can be removed there without a problem.

With zmsoap I can find something like this:
zmsoap -z GetShareInfoRequest/ @by=name
<share folderPath="/MyFolder" granteeDisplayName="" view="contact" ownerName="Homer Simpson" granteeId="1a02827b-95f7-4c6c-b573-be3d5ebe0b13" rights="r" folderUuid="33e295aa-efc8-4795-8972-6ef281758569" ownerId="20282bf0-3257-470c-b9c9-7297734215fb" granteeType="usr" folderId="307" granteeName="" ownerEmail=""/>

As you see, granteeDisplayName and granteeName are empty, while granteeId is set.
I try to remove the Share by
zmmailbox -z -m mfg "/MyFolder" account "" none
or by
zmmailbox -z -m mfg "/MyFolder" account 1a02827b-95f7-4c6c-b573-be3d5ebe0b13 none

In some cases, this seems to work, in others not. I get no error, however the grant is not removed, but modified to read:
<share folderPath="/MyFolder" granteeDisplayName="guest" view="contact" ownerName="Homer Simpson" granteeId="" rights="" folderUuid="33e295aa-efc8-4795-8972-6ef281758569" ownerId="20282bf0-3257-470c-b9c9-7297734215fb" granteeType="guest" folderId="307" granteeName="guest" ownerEmail=""/>
As you see, granteeType, granteeDisplayName and granteeName are "guest", while granteeId and rights are empty.

When I try to remove it by
zmmailbox -z -m mfg "/MyFolder" account "guest" none
nothing happens. The grant still shows up in the web client and can be removed there.

Is this a bug? Am I missing something?
Can anybody help me, on how to remove the orphans?

More info:
I am testing a desaster recovery scenario.
I exported all mailboxes from ZCS 8.8.6 on Ubuntu 16.04 by
zmmailbox -z -m ... -t 0 getRestURL "//?fmt=tgz" > ....tgz
and I imported them on a new installation of ZCS 8.8.15 on Ubuntu 18.04.5 the reverse way.
The complete recovery is done by cli commands. Due to this, the granteeId seems to be orphaned and does not match a regular user.
I know, how to create the new grants and mounts from my backuped information.
However the orphans will annoy the users.
Can anybody help me, on how to remove them?

Best regards to all Zimbra users.

Return to “Administrators”

Who is online

Users browsing this forum: Bing [Bot] and 17 guests