Sutff about my job and comments about personal activities. Take a look to the first idea.

Sunday, April 23, 2017

Running Asterisk with different web user

Freepbx 12 install configure "asterisk" user to run apache server... as explained here:
https://community.freepbx.org/t/running-asterisk-with-different-web-user/26812/1

But, as the same post explain, its better to use www-data user to run apache server...
The diagnostic is that everytime  "amportal chown" or "amportal start" is executed, the ownership of files are changed to "asterisk"...

The config files are needed to modify before running freepbx install
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz
tar xvfz freepbx-12.0-latest.tgz
freepbx/amp_conf/bin/freepbx_engine:AMPASTERISKUSER=www-data
freepbx/install_amp:$runas_uid = "www-data";
freepbx/libfreepbx.install.php: $set['value'] = 'www-data';
freepbx/libfreepbx.install.php: $set['value'] = 'www-data';
cd freepbx
./install_amp --installdb