Open Source Training Seminar FreePBX Paid Support

Ticket #2618 (closed Bugs: worksforme)

Opened 9 months ago

Last modified 3 months ago

install.amp does not set permissions properly.

Reported by: Rhombus Assigned to: p_lindheimer
Priority: minor Milestone: 2.5
Component: Installation Version: 2.3.1
Keywords: install.amp permissions bounce_op.sh module_admin Cc:
Confirmation: Need Feedback SVN Revision (if applicable):
Backend Engine: Asterisk 1.2.x Backend Engine Version: 1.2.18

Description

Using: FreePBX 2.3.1 using the FreePBX source tarballs obtained from FreePBX.org, Gentoo Linux 2.6.21-gentoo-r4, php-5.2.2, mysql-5.0.44, apache-2.0.58-r2. The version of Asterisk is 1.2.18, and is also built from sources.

When I run install.amp on a virgin system, I get a bunch of errors. The output has been truncated to show only the relevant parts:

Setting permissions on files..OK
Checking for upgrades..No upgrades found
Generating AMP configs..
Generating Configurations.conf, (if Asterisk is not running, you will get an error
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configuraions.conf files
/bin/bash: /var/lib/asterisk/bin/retrieve_conf: Permission denied
Generating AMP configs..OK
Restarting Flash Operator Panel../bin/bash: /var/lib/asterisk/bin/bounce_op.sh: Permission denied
OK
Checking music.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Checking infoservices.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Checking featurecodeadmin.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Checking core.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Checking voicemail.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Checking recordings.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Checking framework.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
enabled
Checking dashboard.. sh: /var/lib/asterisk/bin/module_admin: Permission denied
installed
Please update your modules and reload Asterisk by visiting http://10.10.18.50/admin

*************************************************************************
* Note: It's possible that if you click the red 'Update Now' bar BEFORE *
* updating your modules, your machine will start dropping calls. Ensure *
* that all modules are up to date BEFORE YOU CLICK THE RED BAR. As long *
* as this is observed, your machine will be fully functional whilst the *
* upgrade is in progress.                                               *
*************************************************************************
asterisk1 freepbx-2.3.1 #

If I look at the permissions of the scripts in /var/lib/asterisk/bin afterwards, I see that the execute bit has not been set:

asterisk1 bin # ls -liah
total 120K
5128193 drwxr-x--- 2 root root 4.0K Jan  2 18:18 .
4817292 drwxr-xr-x 9 root root 4.0K Jan  2 18:18 ..
5128547 -rw-r--r-- 1 root root  14K Jan  3 11:05 archive_recordings
5128357 -rw-r--r-- 1 root root   34 Jan  3 11:05 bounce_op.sh
5128598 -rw-r--r-- 1 root root 6.9K Jan  3 11:05 freepbx-cron-scheduler.php
5128413 -rwxr--r-- 1 root root 6.9K Jan  3 11:05 freepbx_engine
5128573 -rw-r--r-- 1 root root 8.9K Jan  3 11:05 libfreepbx.confgen.php
5128552 -rw-r--r-- 1 root root  17K Jan  3 11:05 module_admin
5128471 -rw-r--r-- 1 root root  22K Jan  3 11:05 retrieve_conf
5128648 -rw-r--r-- 1 root root  14K Jan  3 11:05 retrieve_op_conf_from_mysql.pl
5128459 -rw-r--r-- 1 root root  621 Jan  3 11:05 retrieve_parse_amportal_conf.pl
asterisk1 bin #

If I correct the permissions manually:

asterisk1 bin # ls -liah
total 124K
5128193 drwxr-x--- 2 root root 4.0K Jan  3 11:37 .
4817292 drwxr-xr-x 9 root root 4.0K Jan  2 18:18 ..
5128547 -rwxr--r-- 1 root root  14K Jan  3 11:37 archive_recordings
5128357 -rwxr--r-- 1 root root   34 Jan  3 11:37 bounce_op.sh
5130234 lrwxrwxrwx 1 root root   63 Jan  3 11:37 fax-process.pl -> /var/www/asterisk1/htdocs/admin/modules/core/bin/fax-process.pl
5128598 -rwxr--r-- 1 root root 6.9K Jan  3 11:37 freepbx-cron-scheduler.php
5128413 -rwxr--r-- 1 root root 6.9K Jan  3 11:37 freepbx_engine
5128573 -rwxr--r-- 1 root root 8.9K Jan  3 11:37 libfreepbx.confgen.php
5128552 -rwxr--r-- 1 root root  17K Jan  3 11:37 module_admin
5128471 -rwxr--r-- 1 root root  22K Jan  3 11:37 retrieve_conf
5128648 -rwxr--r-- 1 root root  14K Jan  3 11:37 retrieve_op_conf_from_mysql.pl
5128459 -rwxr--r-- 1 root root  621 Jan  3 11:37 retrieve_parse_amportal_conf.pl

...then re-run install.amp, I still get permission denied errors for retrieve_conf and bounce_op.sh :

Setting permissions on files..OK
Checking for upgrades..No upgrades found
Generating AMP configs..
Generating Configurations.conf, (if Asterisk is not running, you will get an error
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configuraions.conf files
/bin/bash: /var/lib/asterisk/bin/retrieve_conf: Permission denied
Generating AMP configs..OK
Restarting Flash Operator Panel../bin/bash: /var/lib/asterisk/bin/bounce_op.sh: Permission denied
OK
Checking music..

Module successfully installed
installed
Checking infoservices..
Module successfully installed
installed
Checking featurecodeadmin..
Module successfully installed
installed
Checking core..
Module successfully installed
installed
Checking voicemail..
Module successfully installed
installed
Checking recordings..
Module successfully installed
installed
Checking framework..
The following error(s) occured:
 - Module is already enabled
enabled
Checking dashboard..
Module successfully installed
installed
Please update your modules and reload Asterisk by visiting http://10.10.18.50/admin

*************************************************************************
* Note: It's possible that if you click the red 'Update Now' bar BEFORE *
* updating your modules, your machine will start dropping calls. Ensure *
* that all modules are up to date BEFORE YOU CLICK THE RED BAR. As long *
* as this is observed, your machine will be fully functional whilst the *
* upgrade is in progress.                                               *
*************************************************************************

Change History

01/12/08 08:58:05 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • milestone deleted.

this seems like there may have been issues with what Asterisk user is running as and/or apache which all need to be user asterisk. If you have some specific patches that will help improve permission settings or error reporting, attach them so people can review and give feedback and we can see about getting them in.

07/01/08 16:52:37 changed by lazytt

houskeeping: any updates?

07/01/08 17:36:18 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to worksforme.
  • milestone set to 3.0.

closing do to no feedback form original request. If there is something here, feel free to comment and it can be re-opened.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads