Remove unnecessary permissions.