Error when attempting to update modules - fpbx13 & freebsd 11

I get this error when attempting to update the voicemail module:


I also get:
Whoops \ Exception \ ErrorException (E_WARNING)
chown(): Unable to find uid for www

When accessing the devices panel.

fixed some permission issues on /usr/local/etc/asterisk/keys and /var/cron to no avail


Sounds to me like the user does not exist…

It is stored in a setting called AMPASTERISKWEBUSER in /etc/amportal.conf and it has “www” in it on your PBX… Any idea why?

Good luck and have a nice day!


Well, I can assure you the user exists. Since version 11 in fact (the passed file on the box says):

www:*:80:80::0:0:World Wide Web Owner:/usr/local/www/apache24/data:/bin/tcsh

I even gave it a temp valid shell on the account for testing…

I have the asterisk server running as user www. I should mention that freepbx 12 was fine - but I recently updated to 13 and these problems cropped up.

FreePBX doesn’t know that so you should do what @Marbled said and change the setting (but in Advanced Settings)


Advanced Settings > System Setup > System Web User I believe…

From what he quoted it looks like the problem is that is actually does but can’t properly look it up???

I wonder if there might not be a stray space in there or something similar and it’s actually trying to look up "www " instead of “www”… Maybe the other code that uses this setting is more tolerant to something like this (WriteConfig appears to be something new)…

@iansouth12, could you post a screen capture and maybe delete and retype the user in
Advanced Settings > System Setup > System Web User?

Good luck and have a nice day!

the autocorrect is getting me here.

the user exists in /etc/passwd. Has been there a long time. The settings in /etc/amportal.conf has existed there a long time. Always been working. I do not see anything in the FreePBX advanced settings that look wrong (or obviously wrong). Again the settings in the flat files have been working for a few years now under 11 and 12. And the amportal.conf seems right. Has www defined.

The devices menu problem cleared up I think - but the module admin update problem did not. Still have the BMO errors.

Just for the record - I did retype the user name and submit as requested - that’s odd that that worked.

This is a message from your system. PHP is asking “what is the uid for www” and the system is responding “I dunno”

I meant a screen capture of the error…

Maybe there’s something we are missing in it…

Line 177 in WriteConfig.class.php is

chown($filename, $ampowner);

(ie the chown)


Did you change anything security-wise recently? (users, groups, etc…)

Good luck and have a nice day!


I made sure everything had the right ownerships/perms under /usr/local/etc/www/apache24/data/freepbx - and /usr/local/etc/asterisk - I checked a thing or two in /usr/local/sbin which ended up being symlinks to stuff in /usr/local/etc/asterisk and those perms looked ok. Unless I’m missing something (I’m sure I am)

Thats a stack trace. The stack trace has 13 traces. You’ve decided to only show us 3 of those.

Please take a screen capture of this and post it here…

Good luck and have a nice day!


Safari decided I cannot make the window bigger.

Ok firefox this time…

Apache is not chrooted, right?

It is not

bio… beer… buuuuuuuuurp! :smiley:


Do you have the /etc/pwd.db and /etc/spwd.db files mentioned in that thread


That’s apparently a BSD thing and I wonder if you might have similar problem (the files were no longer in sync) to what that person had and if the fix might be the same…

Good luck and have a nice day!


That’s a good thought - but I vipw’ed the www entry:

[email protected]:/etc # ls -l pwd.db spwd.db
-rw-r–r-- 1 root wheel 40960 Mar 10 17:42 pwd.db
-rw------- 1 root wheel 40960 Mar 10 17:42 spwd.db

Looks like they should be in sync at first glance.