PHP mkdir() permission denied when setting up Sysadmin

Trying to install the sysadmin module in FreePBX, but it keeps giving this:

mkdir(): Permission denied
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at

I’ve tried running fwconsole chown to fix permissions, and it doesn’t help. Really stuck with this one. Apache is running as user asterisk as well.

I’m running on Fedora, PHP 5.6.22, Asterisk 13.9.1. Thanks for any suggestions.

Sysadmin is a commercial module and only supports CentOS 6.x and PHP 5.3. It won’t install on anything else.

1 Like

Shoot, didn’t know that.

Looks like somewhere in the process or trying to make this all work, I broke something nasty:

`[[email protected] asterisk] # fwconsole restart
Exception: could not find driver::could not find driver in file /var/www/html/admin/libraries/utility.functions.php on line 202
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:202
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:101
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:98
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:98
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:69
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:141
  7. require_once() /etc/freepbx.conf:9
  8. include_once() /var/lib/asterisk/bin/fwconsole:12`

Using amportal gives this:
[[email protected] asterisk] # amportal start Please wait... /usr/sbin/amportal: line 44: Fatal: command not found /var/lib/asterisk/bin/freepbx_engine: line 133: Exception:: command not found **** WARNING: ERROR IN CONFIGURATION **** astrundir in '/etc/asterisk' is set to but the directory does not exist. Attempting to create it with: 'mkdir -p ' mkdir: missing operand Try 'mkdir --help' for more information. **** ERROR: COULD NOT CREATE **** Attempt to execute 'mkdir -p ' failed with an exit code of 1 You must create this directory and the try again.

Lastly, my /etc/asterisk/asterisk.conf file…the astrundir definitely exists too:
[directories] astetcdir=/etc/asterisk astmoddir=/usr/lib64/asterisk/modules astvarlibdir=/var/lib/asterisk astagidir=/var/lib/asterisk/agi-bin astspooldir=/var/spool/asterisk astrundir=/var/run/asterisk astlogdir=/var/log/asterisk [options] transmit_silence_during_record=yes languageprefix=yes execincludes=yes

Looks like I messed something up nicely…would anyone be so kind as to help me fix this one?


You don’t seem to have the php mysql pdo driver installed

Right…struggling to get it to load however:

[[email protected] freepbx] # /usr/bin/env php -m | grep -i pdo PDO pdo_sqlite

pdo_mysql is in the /etc/php.d directory:

[[email protected] php.d] # ls *pdo_mysql* 30-pdo_mysql.ini

I’ve done a dnf reinstall php php-common php-pdo php-mysqlnd and still having the same issue. Seems I just can’t get it to load pdo_mysql no matter what.

Edit: While supposedly php.ini is no longer used to load extensions, I did try it anyways, adding:
extension="" extension=""

And now…
[[email protected] freepbx] # /usr/bin/env php -m | grep -i pdo PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ undefined symbol: zend_new_interned_string in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ undefined symbol: mysqlnd_allocator in Unknown on line 0 PDO pdo_sqlite

Hello tm,

Does this mean I cannot install it on CentOS 7 with php 5.4? How am I suppose to install the Endpoint Manager commercial module if I cannot install systemadmin?

We do not support php 5.4. Only php 5.3

Do I need to roll back to 5.3? I just get mkdir(): Permission denied.

We have centos 6.5 and php 5.3.3 version but still not able to install system admin module.
Same error getting like mkdir() permission denied

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.