Make sure group permissions are set. Fixes #1512.