Setting the correct permissions

Hello
After upgrading the installation manually,
I would like to check if the permissions and user:group settings are correct.
I’ve found this article and the relative script I’ve tried to run after having changed the indicated parameters.
https://doc.owncloud.org/server/10.0/admin_manual/installation/installation_wizard.html (POST INSTALLATION STEPS)

however if I run the script, the site returns a 500 error trying to login
any suggestion about how to fix it?

thank you

Did you adjust

htuser=‘www-data’
htgroup=‘www-data’

according your OS?

yes.
on CentOS apache:apache