Errors: amportal.conf not writeable. Retrieve conf failed to copy file(s) from a module's agi-bin

Ubuntu 12.04
Asterisk 1.8

Also tried FreePBX 2.9 and I got the same reports.


  1. Your amportal.conf file is not writeable. FreePBX is running in a crippled mode until changed. You can run ‘amportal chown’ from the Linux command line to rectify this.

I know that this message comes from retrieve_conf. I have tried changing the permission on amportal.conf to 660. Initially the problem goes away but something sets the permissions back again. Anyway, I have a working installation on a raspberry pi (Debian) that has the original permissions and it works perfectly well.

2. Retrieve conf failed to copy file(s) from a module’s agi-bin dir: chmod(): Operation not permitted.

I’m not at all certain exactly what this means but I have tried changing file permissions and even setting apache files to asterisk:asterisk owner/group to no avail.

The FreePBX store to database and the download & install of modules appears to go OK. However it appears that the configuration never gets passed onto asterisk because of the reported problems.

I have looked up just about every post I can find on the Net, relating to these same reports, and I have found nothing that works. Others have reported the same problems as well as the redundant ‘dangling’ symlinks to files that exist nowhere in the installation.

I have spent a very long time trying so many different things to solve these problems including searches via 3 search engines and I still don’t find any new solutions.
Some posts with the same report details go back as far as 4 years. It is astonishing that these problems still exist.

Has anyone any solutions please?

If you installed asterisk with apt-get, then it puts many things in strange places, I suggest you re-compile asterisk from source.

There are still several bits of FreePBX that hard-code docroot to /var/www/html no matter if you edit install_amp so you will need to reconfigure apache2 to use that specific docroot for at least the admin site.

By default you will find apache2 runs as www-data so you will need to either change asterisk/FreePBX or apache2 to agree with each other, or at least give group permissions as appropriate. This is why you can’t “do things”

Unfortunately FreePBX is very Centos-centric so a good knowledge of “alien” will behoove you if yopu use rpm’s,

I suggest you change Ubuntu/Debian behavior to mimic Centos for your ease of mind, because going the other way will hurt you.

I works fine though eventuallyt when you you get all “their” ducks in “your” row,

Good Luck

Thank you for your reply. I did compile asterisk from source. Also, I hate Red Hat based distros. I am trying to get away from them. I’ve messed with CentOS lots but I still haven’t warmed to it. I want an Ubuntu installation with a modern kernel.
So, Ubuntu is essential. I would be happy with my raspberry pi installation but I need to run Skype also. Using ready-made distros brings up its own problems of old kernels, inability to update etc. etc. No, I definitely don’t want to use CentOS. Obviously the people who produce FreePBX etc like CentOS but I do not.

I will have to investigate the differences, that you alluded to re how CentOS is built compared to Debian based. Thanks for your comments.

No room for “haters” here, so STFU about that flame war or see what will happen to you :slight_smile:

Personally for many of the same reasons as you, I use Debian, uncluttered by Ubuntu, but the lineage is still effectively there.

So get your feet wet and read the code, it is all truly open source and install_amp is totally understandable, just get your permissions right and it works smooth as silk, either on Centos or Debian, it is just mysql/php

Thank you for your comments. Trying Debian is not a bad idea at all. I think I might give that a try. I always install PHP5/Apache/Mysql and the necessary add-ons myself. I don’t like the LAMP as I prefer to be up-to-date with PHP etc. However, I can see that this might be a flawed pursuit because it could be that FreePBX works best with PHP4.
Has anyone any comments on that?

I don’t have a problem with FreePBX 2.9 or 2.10 using:-

[email protected]:~# php -v
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug 6 2012 20:08:59)
Copyright © 1997-2009 The PHP Group

[email protected]:~#asterisk -V
Asterisk 10.8.0

[email protected]:~# mysql -V
mysql Ver 14.14 Distrib 5.1.63, for debian-linux-gnu (i486) using readline 6.1

[email protected]:~# apache2 -V
Server version: Apache/2.2.16 (Debian)

Useful information. Thanks.

nano /etc/apache2/envvars

change the lines:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_RUN_USER=asterisk
export APACHE_RUN_GROUP=asterisk