Clean install ISO, no restore.
Yes, we just want to understand the history. As JP said, we are blind and cannot see how you got to this point.
You do not have a clean install now because you have restored users/data somehow (we'd like to know how - you make some explanation of different restore methods but don't explain for THIS server). You have added contribs which again changes things. Between those is the likely culprit for the error.
It would have been good to know the permissions before you started trying to fix things. Not so easy to find out what has happened. Did you record the perms?
Did you restore anything in /var/* ?
The SME backup/restore process I have found over the years to be clumsy
It isn't 'clumsy' but it probably isn't a complex as you want.
There are a number of reasons for this.
The main one is upstream changes to packages & configurations that are out of our control.
v8-v9 required a clean install/restore primarily due to changes in rpms by RH. That complicated things.
v9-v10 mainly due to systemd, plus other changes, particularly httpd/php to try and accomodate user requirements eg multiple PHP versions.
That means any custom templates (note the use of the word 'custom' as in 'non standard') would quite possibly break a new install (which you can see has happened a lot), and there is no simple way to get around that. Custom configs are pretty well infinite. We can't accomodate everything - we do our best, and tend to orientate things to those who help.
Of course the other practical limitation is manpower. We don't have anywhere enough. There are a handful of part time unpaid devs who do this because we enjoy it. That's it.
If you want to effect change and make things less 'clumsy' then rather than sit back, take the easy route and criticise, please get involved and help code your solution. We'll be delighted.
You may then understand some of the complexities involved.