On my FreePBX High Availability cluster, I have fop2 files also stored in /etc/asterisk/fop2 and a c-option in sysconfig/fop2.
Each time I am upgrading fop2, are there any files I have to copy into /etc/asterisk/fop2 to complete the upgrade?
On my FreePBX High Availability cluster, I have fop2 files also stored in /etc/asterisk/fop2 and a c-option in sysconfig/fop2.
Each time I am upgrading fop2, are there any files I have to copy into /etc/asterisk/fop2 to complete the upgrade?
I have just find out why settings do not persist, the fop2settings.db must be copied to /etc/asterisk/fop2 and you will have to modify the file /var/www/html/fop2/admin/pagebs.fop2settings.php and modify the location there to:
$db2 = new dbcon('sqlite:/etc/asterisk/fop2/fop2settings.db');
By the way, you must copy all *.sh scripts.
With each upgrade I have to copy the *.sh scripts? Also the sh.~1~, sh.~2~ files?
As well as modify pagebs.fop2settings.php with each new upgrade?
I modified pagebs.fop2settings.php, and now the changes on manager don't get applied on manager itself. When I hit submit changes it reverts back to what it was before.
How do I make sure my fop2settings file is owned by Asterisk and Asterisk can write to it?
Would this be?:
chown asterisk.asterisk /etc/asterisk/fop2/fop2settings.db
chmod g+w /etc/asterisk/fop2/fop2settings.db
Only .sh scripts. The other ones are backups from previous versions. If you upgrade fop2manager, you will have to modify the full path of the fop2settings.db for now. I will see if I can update it so it checks the -c option to use the proper directory.
As for permissions, you might need to change group for the /etc/asterisk/fop2 directory to the "asterisk" users also (apart for permissions on the fop2settings.db file).
chgrp asterisk /etc/asterisk/fop2
chmod g+rwx /etc/asterisk/fop2
Are these the correct commands to grant fop2settings the correct permissions?
chown asterisk.asterisk /etc/asterisk/fop2/fop2settings.db
chmod g+w /etc/asterisk/fop2/fop2settings.db
Yes, but the directory that holds the file must have correct permissions also, as I mentioned in my previous response.
Permissions for /etc/asterisk/fop2:
drwxrwxr-x 3 asterisk asterisk
Whenever I set permission for /etc/asterisk/fop2/fop2settings.db to include executable rights for asterisk user and group, they revert back to -rw-rw-rw-, once I make a change in fop2 manager settings and hit submit changes.
You do not need execute permissions on the fop2settings.db, only write permission. You need execute permission on a directory for a user or group to be able to read files from them.