[#858] clean up permissions for sudo builds