Upgrade from 5.211 track to 6.12 track and now module upgrades don't work

We just upgraded from 5.211.65-21 to 6.12.65-20, and then to -21, -22, -23, and -24. After the update, we went into the web console and attempted to run the 2.11 -> 12 upgrade tool. Following instructions, I ran the module admin and updated the FreePBX Framework module. After it updated, i clicked to close out the popup and now I get a blank screen whenever I go to the config page. Further inspection of the php log shows the following:

PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Directory /home/asterisk/.gnupg doesn’t exist, and I can’t make it (getGpgLocation).’ in /var/www/html/admin/libraries/BMO/GPG.class.php:605\nStack trace:\n#0 /var/www/html/admin/libraries/BMO/GPG.class.php(336): GPG->getGpgLocation()\n#1 /var/www/html/admin/libraries/BMO/GPG.class.php(484): GPG->runGPG(’–output - /var…’)\n#2 /var/www/html/admin/libraries/BMO/GPG.class.php(139): GPG->checkSig(’/var/www/html/a…’)\n#3 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(180): GPG->verifyModule(‘userman’)\n#4 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(100): Self_Helper->loadObject(‘Userman’)\n#5 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(36): Self_Helper->autoLoad(‘Userman’)\n#6 /var/www/html/admin/modules/userman/functions.inc.php(7): Self_Helper->__get(‘Userman’)\n#7 /var/www/html/admin/modules/bria/functions.inc/userman_hooks.php(23): setup_userman()\n#8 /var/www/html/admin/modules/bria/functions.inc.php(6): include_once(’/var/www/html/a…’ in /var/www/html/admin/libraries/BMO/GPG.class.php on line 605, referer: http://tank/admin/config.php?display=versionupgrade

We looked at the php file, and that block is checking for and creating the directory. I checked, and that directory didn’t exist, so I made it in an ssh session, chown to asterisk:asterisk. I refreshed the browser and I get the same error (although now there are also files in the directory: pubring.gpg, secring.gpg, trustdb.gpg).

I’m not sure what else to do - it seems like the call to is_dir() is returning a bad result, but I’m not sure why or how to fix it.

-Justin

Permissions on /home/asterisk were 655. Changed them to 755 and now it seems to work. Not sure if this matters, but the initial install of this server was 4.211.64-9.

unless you radically changed something outside of the norm the asterisk user’s home directory would be

/var/lib/asterisk and not /home/asterisk

did you do that?

Not changed anything (radically or subtly) here and I have the exact same problem on at least 2 different systems (built at similar times from a distribution ISO and then upgraded regularly)

I have the exact same problem on at 2 different systems (built at different times from a different distribution ISO and then upgraded regularly). The last update:

UPDATE NOTICE: There are 7 modules available for online upgrades
cdr 12.0.12 (current: 12.0.11)
core 12.0.17 (current: 12.0.15)
fax 12.0.7 (current: 12.0.5)
framework 12.0.21 (current: 12.0.19)
pinsets 2.11.0.9 (current: 2.11.0.8)
sysadmin 12.0.11 (current: 12.0.9.8)
userman 12.0.20 (current: 12.0.18)

and now I have errors like this:

FATAL ERROR

FreePBX is Unable to Continue

Directory /home/asterisk/.gnupg doesn’t exist, and I can’t make it (getGpgLocation).

Trace Back

/var/www/html/admin/libraries/BMO/GPG.class.php:336 GPG->getGpgLocation()
/var/www/html/admin/libraries/BMO/GPG.class.php:484 GPG->runGPG()
[0]: --output - /var/www/html/admin/modules/core/module.sig
/var/www/html/admin/libraries/BMO/GPG.class.php:139 GPG->checkSig()
[0]: /var/www/html/admin/modules/core/module.sig
/var/www/html/admin/libraries/BMO/Self_Helper.class.php:180 GPG->verifyModule()
[0]: core/var/www/html/admin/libraries/BMO/Self_Helper.class.php:100 Self_Helper->loadObject()
[0]: Core/var/www/html/admin/libraries/BMO/Self_Helper.class.php:36 Self_Helper->autoLoad()
[0]: Core/var/www/html/admin/libraries/BMO/GuiHooks.class.php:249 Self_Helper->__get()
[0]: Core/var/www/html/admin/libraries/BMO/GuiHooks.class.php:226 GuiHooks->doBMOConfigPage()
[0]: Core
[1]: trunks/var/www/html/admin/config.php:312 GuiHooks->doConfigPageInits()
[0]: trunks
[1]:

No Dicko our RPMs have set /home/asterisk for along time.

Thank you for clarifying Tony, I’m sure there is a reason for that.

However, on a clean install of “FreePBX-64bit-6.12.65.iso” the .gnupg directory is where I expected it to be in /var/lib/asterisk and not /home/asterisk which is there but empty. I hope you can see the cause of my confusion (and apparently the distro itself also)

Happy Solstice celebrations to all around the world.

I got an evil Christmas present overnight. I have a similar upgrade path as mentioned in this thread, but overnight (Christmas night) now when I access the web gui, I get:

FATAL ERROR

FreePBX is Unable to Continue

Directory /home/asterisk/.gnupg doesn’t exist, and I can’t make it (getGpgLocation).

Trace Back

/var/www/html/admin/libraries/BMO/GPG.class.php:336 GPG->getGpgLocation()

/var/www/html/admin/libraries/BMO/GPG.class.php:484 GPG->runGPG()
[0]: --output - /var/www/html/admin/modules/extensionroutes/module.sig

/var/www/html/admin/libraries/BMO/GPG.class.php:139 GPG->checkSig()
[0]: /var/www/html/admin/modules/extensionroutes/module.sig

/var/www/html/admin/libraries/BMO/Self_Helper.class.php:180 GPG->verifyModule()
[0]: extensionroutes

/var/www/html/admin/libraries/BMO/Self_Helper.class.php:100 Self_Helper->loadObject()
[0]: Extensionroutes

/var/www/html/admin/libraries/BMO/Self_Helper.class.php:36 Self_Helper->autoLoad()
[0]: Extensionroutes

/var/www/html/admin/modules/extensionroutes/functions.inc/functions.inc.php:505 Self_Helper->__get()
[0]: Extensionroutes

/var/www/html/admin/libraries/BMO/GuiHooks.class.php:237 extensionroutes_configpageinit()
[0]: index

/var/www/html/admin/config.php:312 GuiHooks->doConfigPageInits()
[0]: index
[1]:

Any help would be appreciated!!!

The solution is already stated in this thread. I suggest you read it.

Dicko,

on your clean install of “FreePBX-64bit-6.12.65.iso”, what are the permissions on /var/lib/asterisk and /home/asterisk? I hadn’t checked on this server prior to the 6.12 track upgrade, but I looked on another system that started as 3.211.63 and has been updated up through 5.211.65-21 and the /home/asterisk directory is 755. So I’m not sure if this is happening somewhere in a previous update/installation or if it is tied to the 6.12 upgrade. We plan to upgrade the other system during the new year holiday - I’ll watch it and report back to here any oddities I see.

Upgraded another server and had no issues - it must be a small hiccup. I put in an improvement bug for amportal to change permissions on the /home/asterisk folder to 755: http://issues.freepbx.org/browse/FREEPBX-8521