Your hosts have been grossly irresponsible. I recommend that you chastise them accordingly and/or switch to a more reasonable provider.
Migrating applications from PHP4 to 5 is nontrivial and clearly your production server should under no circumstances be upgraded without thorough testing on your development / test server(s).
Needless to say, upgrading from 4 to 5 should not affect any file permissions, so perhaps the cause of that problem lies elsewhere.
Shared hosting is a major cause of problems- don't use it if you can avoid it, please!
I am wondering if anyone on the forums knows any hosts which host PHP apps in a responsible fashion (e.g. not doing upgrades without ample notification)?
(NB: I don't use third party shared hosting for my apps nor should you if you can avoid it)
When upgrading our major application from PHP4 to PHP5, I found it inconvenient to make a version which works on both (due to missing features in PHP4 and increased strictness in 5), so I just bit the bullet and scrapped PHP4 support. However, this means that a very coordinated approach is required with the hosting provider.
Mark