I have seen on more systems that the update fails in the middle of the update process, because some files/directory's are not writable for the update. So when this happens the installation is broken, because it is an mix of the old and the new version. Other php projects like nextcloud have an checker build in, which tests the files/directory for writing before and print out which items must fixed, before the update itself starts. I think this feature will be very useful also for matomo,
Thanks for creating this issue @tuxmaster5000 that would be useful indeed to make sure the updater works in most cases as otherwise people might stop using us as soon as the update fails. As part of this issue let's check if directories are writiable and if that's easy to do first before fully developing it. AKA if it would be a bigger job we'd need to maybe reschedule it.