Voicemail configuration file

I’m pretty new to asterisk and have been getting my system setup over the past month. It is running with FreePBX 2.5.1.3. I wonder if there is any special way to setup the voicemail module (2.5.1.6). When I change the voicemail parameters in an extension those changes don’t get written to voicemail.conf, rather they are written to what seems to be a temporary file VZ6HRU~M. If I edit anything in voicemail.conf and then update an extension in FreePBX then those changes get overwritten in voicemail.conf. Usually the files that shouldn’t be edited outside of FreePBX have a header stating that the file shouldn’t be edited but voicemail.conf doesn’t have that. Regardless, FreePBX isn’t updating voicemail.conf with the correct voicemail parameters and I can’t edit it manually and have those changes remain.
Here is what gets written to voicemail.conf when I update an extension:

[general]
#include vm_general.inc
#include vm_email.inc
[default]
[default]

Both vm_general.inc and vm_email.inc are basically empty and then that mysterious file VZ6HRU~M has the updated voicemail extension info like this:

6000 => 1234,6000,attach=no|saycid=no|envelope=no|delete=no
[general]
#include vm_general.inc
#include vm_email.inc
[default]

It sounds like your install didn’t complete properly. vm_general.inc and vm_email.inc should have information in them.

Please provide more information on how you built this system. Is it hand built? if so directions that you follows (and anything you did different changed). IF it is a distro who’s and what version.

Is asterisk running as root or as asterisk like it should be?

Your comments made me think that the file permissions may be setup incorrectly. After some googling I changed the file permissions and now everything is working fine.