New Install: Apply Configuration Changes Fail with exit: 126

Yup, I know, people have been posting about this. But, none of their solutions work for me. Maybe a fresh look may create a solution for me.

Out of a dozen fresh installs using the install documentation on this site, all of them end with the same problem: applying configuration changes step fails.

The error that comes up in the yellow box:

[code]Reload failed because retrieve_conf encountered an error: 126

exit: 126
sh: /var/lib/asterisk/bin/retrieve_conf: Permission denied

1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.[/code]

There is no log on the dashboard or main screen, and just to drive the knife in further, nothing in the asterisk cli either. The final line beginning with “1 error(s) occurred” is freaking useless if the nothing is shown where I’m told to look.

Tried to troubleshoot this problem, but no success with the following:

Make sure apache is running as asterisk.
Um…yeah. And how do I do this? I will “assume” httpd is what is being talked about instead. In which case, yup, httpd is running as asterisk. Output of ps -U asterisk -u asterisk:
PID TTY TIME CMD
2651 ? 00:00:19 httpd
2652 ? 00:00:19 httpd
2653 ? 00:00:19 httpd
2654 ? 00:00:19 httpd
2655 ? 00:00:18 httpd
2656 ? 00:00:19 httpd
2657 ? 00:00:19 httpd
2678 ? 00:00:19 httpd
3410 pts/0 00:00:00 asterisk
3463 ? 00:00:00 bash
3464 ? 00:00:00 sh
3465 ? 00:00:00 op_server.pl

Check the permissions for retrieve_conf.
ls -al retrieve_conf produces: -rwxrwx–x 1 asterisk asterisk 27081 May 20 16:12 retrieve_conf
Yup, asterisk has access and executable permissions. But, I did the following anyway:
chown asterisk:www-data -R /var/lib/asterisk/
chown asterisk:www-data -R /etc/asterisk/
chown asterisk:www-data -R /etc/amportal.conf
chmod 770 -R /var/lib/asterisk/
chmod 775 -R /etc/asterisk/
chmod 770 -R /etc/amportal.conf

chmod 777 /var/lib/asterisk/bin/retrieve_conf

I’m at a complete loss. Up to the step requiring the first time log in to the admin page to apply configuration changes, I have been able to solve the problems the writer of the tutorial didn’t bother to make sure weren’t going to happen, such as the required developer packages that aren’t even mentioned needing to be yumed.

Does anyone have any idea what may solve this problem?

Thanks.

“using the install documentation on this site” which set? there are many different sets…

You are not saying which flavor of Linux you are using so it’s hard to guess but 95% of install problems are either 1. missing a step, deciding you know better then the directions and adjusting them to fit your specific need. etc. 2. there is a permissions issue with the OS and specific version you have picked and how it sets things up from what is expected.

Since you don’t say we are left with a huge void of information that is needed to really help you.

Remember you know what you have done and we don’t, so help us help you and provide all the details so that we know as much as you then we can try and help.

You are right about the sets. I’m following the set for centos 5.1 at http://www.freepbx.org/support/documentation/installation/install-process-for-centos-5-1. The site says that’s what the developer testing is done on, why should I use anything else?

1 line above # 7 is where I am stuck. Instructions are followed line by line by line, changing only the ip addresses to fit my network. I definitely won’t get anywhere if I don’t change the ip addresses.

Looking through the only thing that jumps out is the “yum -y update” I’ve been running CentOS 5.2 for a while, so I don’t know if it does a 5.1–>5.2 thing. I would skip that step and see what it does.

I have seen other reports of yum -y update causing the same error.

Seeing that a bunch of stuff gets installed after the update, that somehow feels funny too.

Or not?

Not doing the update is the first item I plan on looking after I go through another run through the instructions. I looked at the current attempt, centos 5.3 is installed. So, I am going to load 5.1 again and see what happens without updating.

Update the Apache configuration file.
1

vi /etc/httpd/conf/httpd.conf

Change User apache and Group apache to User asterisk and Group asterisk.

Change AllowOverride None to AllowOverride All.