Setting Permissions interrupted

Hi

After upgrade to framework 13.0.29 I had following error while running “Apply Config”:

exit: 1
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Exception: Unable to connect to Asterisk through the CLI in file /var/lib/asterisk/bin/retrieve_conf on line 24
Stack trace:
  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:24

Asterisk is running without problems, because of that I was searching for the reason.

When I perform fwconsole -vvv chown, an other error occurs. Here is the trace:

Can someone help me? Could it be an error with JSON-files?

What user is Asterisk running under?

Asterisk: root
Apache: asterisk

I have nothing changed since the upgrade to framework 13.0.29.

Are you running a Distro install? Asterisk should be running as user “Asterisk”. That is your problem.

Asterisk and FreePBX are running under Ubuntu 14.04 LTS. Should in this situation asterisk also run as user “asterisk”?

Yes, it should be. The error is FreePBX trying to communicate with Asterisk but not having the permissions to.

I have tested it with Asterisk running as user “asterisk”, but the same error appears.

fwconsole runs as the logged in user (usually root) so for the chown operation it doesn’t matter what root is running as. I will take a look at the code and post a follow up. chown actually doesn’t need asterisk at all so it is weird that asterisk running or not running would be an issue

line 332:


throw new \Exception(sprintf(_("Unknown filetype of: %s[%s]"),$filetype,$file));

it seems maybe the function is being called with an empty string which shouldn’t happen.

if you want file a bug at http://issues.freepbx.org and I will do some additional validation on the file names

Thanks James, here is the bug report.

http://issues.freepbx.org/browse/FREEPBX-11073