After upgrade to ubuntu 14.04, attempted upgrade to FreePBX 13 left in partial state

After minor module upgrades I got a tampered file warning for amportal. I tried:
amportal chown; amportal a ma refreshsignatures (which redownloaded framework saying sig was invalid); amportal a reload. The warning persisted no matter what I tried.This was later confirmed by Andrew Nagy as a module publishing issue that has been resolved. However…

In the meantime I downloaded and tried to install 13.0-latest from command line according to: http://wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+Ubuntu+Server+14.04.2+LTS
This seemingly went along fine until: ./install -n
at which point I got:
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Done!
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install…No (/etc/amportal.conf file detected)
PHP Fatal error: Call to a member function getAll() on a non-object in /var/www/admin/libraries/BMO/Freepbx_conf.class.php on line 216

Fortunately the GUI still runs. It shows version 12.0.76 and reports all modules up to date (stable stream). But now there are 7 additional “tampered files” all related to MoH - which has been disabled “pending upgrade to 13.0.6”. Framework still shows as tampered.

I had hoped to get past the whole mess by installing 13.0 but as above that didn’t work out so well. Now I’m stuck - unable to complete the command line install of 13.0, and the GUI doesn’t want to upgrade anything either.

How do I get back to a a normal state either with 13.0.6 or 12.0.76? Naturally this is a live system - although not critical, it would be a huge paid to lose the current configuration. Any help appreciated!

Norm Henderson
Clinica CEML
(charity hospital in Angola)

Upgrading through the commandline is difficult, and you really don’t want to do it. There’s a MODULE that does the upgrade for you, and that may work, but as your machine is in an unknown state, I wouldn’t push it.

I’d start with manually installing the correct version of MOH - Just paste this into ‘Download from web’ - http://mirror1.freepbx.org/modules/packages/music/music-12.0.1.tgz

Then, please tell me what is coming up tampered in Framework. That’s the important thing.

Thank you so much. I am now back to what looks like the original problem - MoH is fine now. The file that still shows as tampered is amportal (Module: ‘FreePBX Framework’, File: ‘/usr/local/sbin/amportal altered’)

Version is reported at the bottom of the pages as 12.0.76.2. A “check online” shows only the following potential upgrades:
CDR reports 12.0.22 to 12.0.23
Voicemail 12.0.40 to 12.0.43

Next step?

Odd. Try this (as root)

amportal a ma download framework
amportal a ma install framework

root@VM-CEML:~# amportal a ma download framework

Please wait…

Found module locally, verifying…Verified. Using Local

Untaring…Done
Module framework successfully downloaded
bash: warning: setlocale: LC_ALL: cannot change locale (en_US)

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
SETTING FILE PERMISSIONS…Done
Removing any dangling symlinks
Dangling symlinks removed
root@VM-CEML:~# amportal a ma install framework

Please wait…

installing files to /var/www…done
installing files to /var/lib/asterisk/bin…done
installing files to /var/lib/asterisk/agi-bin…done
Checking for upgrades…No further upgrades necessary
framework file install done, removing packages from module
file/directory: /var/www/admin/modules/framework/amp_conf removed successfully
file/directory: /var/www/admin/modules/framework/upgrades removed successfully
file/directory: /var/www/admin/modules/framework/libfreepbx.install.php removed successfully
Generating CSS…Done
Module framework successfully installed
bash: warning: setlocale: LC_ALL: cannot change locale (en_US)

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
SETTING FILE PERMISSIONS…Done
Removing any dangling symlinks
Dangling symlinks removed
root@VM-CEML:~# amportal chown

Please wait…

SETTING FILE PERMISSIONS…Done
Removing any dangling symlinks
Dangling symlinks removed
root@VM-CEML:~# amportal a r

Please wait…

Successfully reloaded

Then - GUI continues to report the same tampered file:

You have 1 tampered files
Module: ‘FreePBX Framework’, File: ‘/usr/local/sbin/amportal altered’ (If you just updated FreePBX, you’ll need to run ‘amportal chown’ and then ‘amportal a r’ to clear this message. If you did not just update FreePBX, your system may have been compromised)
3 Seconds, Ago

Now: repeating something I tried before:
root@VM-CEML:~# amportal a ma refreshsignatures
Please wait…
Getting Data from Online Server…
…(most of the modules are good)
Checking framework…Signature Invalid
Refreshing framework
Downloading 5081756 of 5081756 (100%)

Untaring…Done
Module framework successfully downloaded
installing files to /var/www…done
installing files to /var/lib/asterisk/bin…done
installing files to /var/lib/asterisk/agi-bin…done
Checking for upgrades…No further upgrades necessary
framework file install done, removing packages from module
file/directory: /var/www/admin/modules/framework/amp_conf removed successfully
file/directory: /var/www/admin/modules/framework/upgrades removed successfully
file/directory: /var/www/admin/modules/framework/libfreepbx.install.php removed successfully
Generating CSS…Done
Module framework successfully installed
Verifying GPG…Done

So, after all that, and refreshing the browser, the GUI still warns me of the same tampered file “6 seconds ago”.

What next?

Sounds like /usr/local/sbin/amportal might be a symlink? That’s why it’s not being updated correctly.

Try this – ‘amportal ma download framework’, which will give you a known good amportal in /var/www/html/admin/modules/framework/amp_conf/sbin/amportal which you can then delete the symlink and copy that file in place.

Thank you very much Rob, yes it was a symlink pointed to /usr/src/… I followed your instructions. For good measure I ran amportal a ma refreshsignatures again and it still reported framework as invalid and purported to redownload, which surprised me… anyway I proceeded with : amportal chown ; amportal a r ; amportal restart - and the infernal warning no longer appears on the GUI. I was able to upgrade a couple of modules through the GUI in the normal way without issues.

Unless there is anything else you suggest (backup obviously!) I guess this is solved, thanks again! - Norm

1 Like