I had the same error and I’m not really sure why. I think it has to do something with the folder permissions. My workaround was to create a backup of my installation and DB and perform the upgrade on my local server. Once upgrade was completed I upload all to my production server. It worked for me, at least.