Install FreePBX with different user and group IDs

Hi
I am trying to install FreePBX 12.0.51 with the following command

./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW} --webroot=/srv/www/htdocs/freepbx --cgibin=/srv/www/cgi-bin --uid=wwwrun --gid=www --force-overwrite --freepbxip=192.168.2.100 --cleaninstall

but the created folder (freepbx) has still the default user/group IDs (asterisk/asterisk). I have tried to add my apache user, wwwrun, to asterisk group, but the UI does not work anymore correctly. The only way I able able to install FreePBX is to change user and group IDs under which apache server runs. I am using openSUSE 13.2.

Could someone tell me how can I change the default user and group IDs for FreePBX ?

regards
Bogdan

just curious why you don’t simply use the distro install?

Because we are not all sheep perhaps ?

Some linux cognoscenti would argue that Redhat is the last choice for a modern linux system. It is compounded many times by decisions that are in fact extremely conservative, is pretty rigid in supporting Hardware newer than about 5 years old and software also, an example would be python but yum needs a very old version :wink: it is IMHO outright old-fashioned for those a little lighter on their feet.

FreePBX has for many years marketed itself as a OS independent system, it needs Asterisk, PHP , a web server, and a database server that looks a lot like mysql. When that changes in the “root” thinking of FreePBX per se (obviously not the distro, which is only available for a limited subset of OS/harware, thus they have made that exclusive decision already) then that will be a bad day.

.

JM2WAE

@cristeab You need to just explore the install_amp script to see why it fails, it is as yet not very OS specific aware. (come on, it was you that chose Suse, this could not be the first time you have run into incompatibilities :wink: )

dicko,

horses for courses i guess.

unless you need access to the hardware (analog cards, etc.) running as a vm masks most of the hardware issues and using the distro really simplifies the install. but each to their own.

Using Virtualization ( I use KVM and usually have some T1’s on the host machines, use Dahdi’s dynamicEth driver on host and clients to supply machines with their individual tdm service) allows you to snapshot and/or clone any machine in a few seconds. Your base machine only needs to be built once, with all your preferences and additional work being preserved. (unless of course you use any locked down commercially licensed stuff)

The hardware issues you have are only delegated to the Host machine. There are none I know in Debian.

Hi

I’ll try to change the install script if there is no other solution. However these 2 command line parameters:
–uid
–gid
don’t seem to have the desired effect. Should this be considered a bug in the install script ?

regards
Bogdan

Possibly, in the install_amp script in the section following:-

//initialize variables to avoid php notices

there are some defaults set:-

$runas_uid = “asterisk”;
$runas_gid = “asterisk”;

before the foreach args bit which sets it which on a cursory look seems to be doing it right.

however later we have some chown’s that set to $asteriskuser which might remain from an previous incomplete install, a little grepping shows

chown($amp_conf[‘AMPWEBROOT’].’/admin/modules/framework’,$asteriskuser);
chown($amp_conf[‘AMPWEBROOT’].’/admin/modules/framework/module.xml’,$asteriskuser);
chown($amp_conf[‘AMPWEBROOT’].’/admin/modules/framework’,$asteriskuser);
chown(dirname(FILE).’/amp_conf/htdocs/admin/modules’,$asteriskuser);
chown($amp_conf[‘AMPWEBROOT’].’/admin/modules’,$asteriskuser);
chown($amp_conf[‘AMPWEBROOT’].’/admin/modules/framework/module.xml’,$asteriskuser);

I might look and explore those results of those lines on your deployment.

But to CYA before thinking of raising a “bug report” do an uninstall first because perhaps some config files from a failed first attempt remain and add --cleaninstall to your next set of install arguments (Doing both is possible an unnecessary “belt and braces” approach, I sometimes do that :wink: ) .

Hi

I am trying to use a customized Linux appliance with Asterisk and I am more
familiar with opensuse. However since there is a way to use different
user/group for the install, why it is not working ?

Bogdan