Conversion script

Starting a new thread for this…trying the conversion script to help me go from 13 non-distro (Centos) to 14 distro. Getting some errors:

Testing FreePBX functionality ... PHP Warning:  include(/etc/freepbx.conf): failed to open stream: Permission denied in /tmp/tmp.F1TJVFFGxz/ on line 8
PHP Warning:  include(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /tmp/tmp.F1TJVFFGxz/ on line 8
PHP Fatal error:  Call to undefined function get_framework_version() in /tmp/tmp.F1TJVFFGxz/freepbx.test.php on line 4
Checking Slot ID ... PHP Notice:  Undefined offset: 1 in /tmp/tmp.F1TJVFFGxz/donormachine.php on line 15
Getting modules to convert ... Complete! 106 modules
Dumping astdb ... Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Error running "asterisk -rx 'database show'", unable to continue
Cleaning up...Done!

I’ve tried setting permissions of /var/run/asterisk/asterisk.ctl to 777 even (instead of 775). Asterisk is running as well. Not sure what else to try. Ideas?

EDIT: fixed, have to run as root on the donor as well, not as sudo.