Fix setting permissions on sqlng shares when also saving.

We need available permissions to be set before saving, otherwise
the perms_* columns will not be saved. Fixes Bug: 12413