FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!
Showing posts with label Centos. Show all posts
Showing posts with label Centos. Show all posts

Thursday, November 4

This may be a better approach to permissions

One of the most common problems observed in the FusionPBX forum are permission issues.  The balance you have to achieve though is security vs. usability.

By default, the Centos ISO comes with freeswitch having an owner of freeswitch and a group of freeswitch and fusionpbx has an owner of apache and a group of daemon.  As a result there are problems of interoperability between the two that have to be solved by using chmod to set permissions for group and other and by using chgrp to change the group on some directories.

One solution to this dilemma is to set the owner and group on both to be the same as each other.  Accordingly you might want to try this:
chown -R apache:apache /usr/local/freeswitch
chown -R apache:apache /var/www/fusionpbx

Keep the chmod as 755 on /usr/local/freeswitch and /var/www/fusionpbx.  In fact you could even try 700 or 600 if you want.
CORRECTION: you can keep 755 on fusionpbx but you need 775 on /usr/local/freeswitch.  You also need to edit /etc/group and change the line "apache:x:48:" to "apache:x:48:freeswitch,apache".  With this change freeswitch is able to start without needing to be run by root.

Security experts might want to comment on why doing this would be a bad idea....?

NOTE: The instructions above assume that the owner of the fusionpbx directory on your server is apache. On ubuntu and other systems it might be www-data or something else.  Take a look at the existing owner of this directory and that is the owner to make use of in the instructions above.  It is basically your webserver's account.

Thursday, September 23

Back on the Centos ISO based FusionPBX

Re-installing from the old Centos ISO on a new machine, there is a really simple way to bring fusionpbx up to date.  Go to /var/www and do rm -r -f fusionpbx.  Then svn checkout http://fusionpbx.googlecode.com/svn/trunk/fusionpbx.  Then svn update.  This will download all the latest fusionpbx code.


Then chmod -R 776 fusionpbx and chown -R apache:daemon fusionpbx to set the permissions correctly and now you can go to the web gui and log in - as it will be the first time it will take you through the install dialogs and then you are up and running with a brand new pbx.


Of course, you don't actually have to be installing from the Centos ISO.  If you are running Centos (or presumably any other OS with svn available) you can follow the same procedure.  The only thing is in this case you will have had to already install freeswitch (which can't be installed that simply as far as I can determine - you'll need to be able to compile it and I haven't tried that yet).


Once you've installed fusionpbx this way, if you want, rather than pressing the upgrade button in the GUI, you can always go to the shell prompt and cd /var/www/fusionpbx and do svn update.  However, after doing this you also need to go to http://yourpbxipaddress/core/upgrade/upgrade_schema.php as that will ensure that your database is updated to include any new tables that have been added with the latest update.

Monday, August 23

Did I make the right decision?

At the start of this process I decided to use the Centos ISO for installing FusionPBX.  Well, I'm beginning to question this decision now for the following reasons:
1. although I can update the FusionPBX code very easily with a single button to press, I cannot update the Freeswitch version without learning how to compile updates from git.  This is because there are no updates available for FusionPBX using a package manager in Centos at this time.
2. There are permission issues in the Centos image - as you will have already seen earlier in my blog - I've fixed some of them but I suspect that there are others as there are still some things that don't work right.
3. It seems that Centos is not the most efficient OS and takes more memory to function well than something like FreeBSD does.

So I'm looking to change to FreeBSD.  Actually to be more precise, I'm looking to change to pfsense because this runs on FreeBSD and actually uses an even more stripped down version of FreeBSD so that it runs with less memory.  Doing this apparently solves all the problems I've identified above.  I'm going to start by trying pfsense 1.2.3 not pfsense 2 as I understand it isn't quite working well with version 2 yet.

UPDATE: Well, I've installed pfsense a few days back (using the download here: http://www.pfsense.org/index.php?option=com_content&task=view&id=58&Itemid=46) and loaded fusionpbx on top of it (using these instructions: http://wiki.fusionpbx.com/index.php/PfSense_Install#pfSense_1.2.3_or_pfSense_2.0).  I'm still fiddling with the setup a little and experimenting with it and when I'm happy I'll post more details.  For now the update is that it seems to be good, although I think I may have a permission problem right now that I need to overcome and document.  One of the nice benefits that there seems to be is that pfsense appears to come already setup with OpenVPN which means that once I have that up and running remote administration should be very straightforward in theory, though I haven't tried it yet.

Warning: I have been informed that there is a problem running fusionpbx on an embedded version of pfsense - apparently due to the file system used by pfsense, some data is lost when the machine is rebooted and this impacts the operation of fusionpbx.  This issue apparently does not apply to pfsense installed on a harddrive though.

My conclusions may not suit you.  You need to work out what is important to you and to test it yourself!