Installation issue with freepbx on a debian box

Hi there, I’m stuck on a step in the installation here… Basically, I have everything installed on Debian and most of the installation script goes through, but I get these error/warning msgs and the installation stalls…

Warning: main(/var/www/html/admin/extensions.class.php): failed to open stream: Permission denied in /var/lib/asterisk/bin/retrieve_conf on line 222

Fatal error: main(): Failed opening required ‘/var/www/html/admin/extensions.class.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/lib/asterisk/bin/retrieve_conf on line 222
Generating AMP configs…OK
Restarting Flash Operator Panel…-su: line 1: /var/www/html/admin/bounce_op.sh: Permission denied
OK
DB Error: no such table

I tried chmodding the permission denied files with no luck… Any ideas???

which version deb???

this is for sarge woody is a little different I had to many issues on woody

http://www.squishychicken.com/index.php?option=com_content&task=view&id=13&Itemid=2

I have the latest Sarge on here. I installed it from minimal install. The server is colocated, and I’m running VHCS on there. I made sim-links for the htdocs and cgi-bin directories so the installer wouldn’t get confused. I followed those steps in the Squishy Chicken thing and I ended up with this error…

Setting permissions on files…OK
Checking for upgrades…Current version not found
Generating AMP configs…
Generating Configurations.conf…
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Connecting to database…OK

Warning: main(/var/www/html/admin/extensions.class.php): failed to open stream: Permission denied in /var/lib/asterisk/bin/retrieve_conf on line 222

Fatal error: main(): Failed opening required ‘/var/www/html/admin/extensions.class.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/lib/asterisk/bin/retrieve_conf on line 222
Generating AMP configs…OK
Restarting Flash Operator Panel…-su: line 1: /var/www/html/admin/bounce_op.sh: Permission denied
OK
DB Error: no such table

chek to be sure you asterisk as httpd. and the user has 0755 recursive rights on www/html

Everything installs smoothly. I run amportal stop, amportal chown and amportal start…

amportal start

SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK
Asterisk Started

STARTING FOP SERVER
-su: line 1: cd: /var/www/virtual/easy-phone.ca/htdocs/panel: Permission denied
safe_opserver: no process killed


The FOP’s server (op_server.pl) could not start!

I’m not too concerned about the Flash Operator Panel. I get the index page allright, but when going to the admin page I get this…

Warning: file(): open_basedir restriction in effect. File(/etc/amportal.conf) is not within the allowed path(s): (/var/www/virtual/easy-phone.ca/:/usr/share/php/:/tmp/) in /var/www/virtual/easy-phone.ca/htdocs/freepbx/admin/functions.inc.php on line 17

Warning: file(/etc/amportal.conf): failed to open stream: Operation not permitted in /var/www/virtual/easy-phone.ca/htdocs/freepbx/admin/functions.inc.php on line 17

Missing or unreadable config file (/etc/amportal.conf)…cannot continue

My guess is that its something related to what you mentioned with the chmodding to 0755, I just forget the syntax… Right now I’m running VHCS, and want to keep the user and group set to “www-data”. Is there any way to make that work?

Well we use webmin on all the Asterisk boxes
and I run the virtual hosts
I have about 15 website on box (click to call ecomm)

I do not have any issue running httpd as asterisk.

But I have never messed with VHCS so ??

it seems to be a quirk of VHCS… I try to change the httpd user and group to asterisk, and I lose permission to read all my sites… I’ve used ISPConfig, I didn’t have a problem with changing the user and group information there. Just as an aside, I ended up switching back to VHCS because ISPConfig was a real pain in the but to get the idiot e-mail to send/receive properly, and it was a little buggy. VHCS seems a little more stable to me.

Anyway, I came across an updated howto, http://powerontech.com/freepbx-on-debian.htm , but I still run into the same issue. As far as I can see it, I can either find a way to change around the configuration file in /ets/apache2/sites-available directory to maybe try and get the system to recognize a special group/user for one site.

OR (my preference), find a way to give User and Group www-data the additional rights that equal that of asterisk. Any ideas on an elegant way to do it?

Problem solved. I manually edited the /sbin/amportal file to change the user/group to what I want. I also went into the vhcs configuration file in the /ets/apache2/sites-available directory and added /etc/ to the allowed path list for php (you have to hunt up the ip addy you have your domain attached to, and you’ll see the path list there).

What I did was to create another apache process with it running as
asterisk.asterisk and just for those directories. Also, you can turn
safe mode off in your php.ini so that should solve the amportal.conf
not being readable.

on Tuesday 06/13/2006 pborm([email protected]) wrote

Everything installs smoothly. I run amportal stop, amportal chown and amportal start…

amportal start

SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK
Asterisk Started

STARTING FOP SERVER
-su: line 1: cd: /var/www/virtual/easy-phone.ca/htdocs/panel: Permission denied
safe_opserver: no process killed


The FOP’s server (op_server.pl) could not start!

I’m not too concerned about the Flash Operator Panel. I get the index page allright, but when going to the admin page I get this…

Warning: file(): open_basedir restriction in effect. File(/etc/amportal.conf) is not within the allowed path(s): (/var/www/virtual/easy-phone.ca/:/usr/share/php/:/tmp/) in /var/www/virtual/easy-phone.ca/htdocs/freepbx/admin/functions.inc.php on line 17

Warning: file(/etc/amportal.conf): failed to open stream: Operation not permitted in /var/www/virtual/easy-phone.ca/htdocs/freepbx/admin/functions.inc.php on line 17

Missing or unreadable config file (/etc/amportal.conf)…cannot continue

My guess is that its something related to what you mentioned with the chmodding to 0755, I just forget the syntax… Right now I’m running VHCS, and want to keep the user and group set to “www-data”. Is there any way to make that work?


Amportal-users mailing list
[email protected]
amportal-users List Signup and Options


Your life is like a penny. You’re going to lose it. The question is:
How do
you spend it?

     John Covici
     [email protected]

Amportal-users mailing list
[email protected]

Post generated using Mail2Forum (http://www.mail2forum.com)