Remove unneeded permissions.