SOLVED Errors updating using https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-6.sh and above

The errors shown below disappear after running https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-11.sh

Tried grading using FreePBX GUI from 6.12 to 10.13. Too many errors using the GUI to upgrade so proceeded to do upgrades via ssh to server.

Seeing the following after getting to 10.13.66-1 and subsequent upgrades.

Ran fwconsole chown a few times in between the upgrades but it doesn’t seem to fix the errors.

STAGE 5 STARTING - Final Verifications

./upgrade-10.13.66-4.sh: line 351: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied

Currently running upgrade https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-6.sh

Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 13
Stack trace:

  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:13

STAGE 5 COMPLETED - Final Verifications - Moving to Stage 6

./upgrade-10.13.66-4.sh: line 359: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied

./upgrade-10.13.66-4.sh: line 364: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied
Wed Jul 13 06:17:27 EDT 2016 UPGRADE 100% COMPLETED
./upgrade-10.13.66-4.sh: line 369: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied
./upgrade-10.13.66-4.sh: line 370: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied
./upgrade-10.13.66-4.sh: line 371: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied

Continuing on with further upgrades to get to -11, see the exact same errors as above.

STAGE 1 COMPLETED - GUI Modules - Moving to Stage 2

./upgrade-10.13.66-8.sh: line 116: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied

STAGE 2 STARTING - RPMs

./upgrade-10.13.66-8.sh: line 122: /var/www/html/admin/modules/sysadmin/hooks/update-system: Permission denied