Upgrade (v5-v6) or update (v6-v6) fails because files cannot be written or replaced