Any time I try to save a system recording on FreePBX 2.5 I get the following:
[ERROR] SAVING RECORDING:
cp: cannot open `/tmp/9999-ivrrecording.wav’ for reading: Permission denied
Make sure you have entered a proper name
[ERROR] REMOVING TEMPORARY RECORDING:
cp: cannot open `/tmp/9999-ivrrecording.wav’ for reading: Permission denied
Make sure Asterisk is not running as root
“9999” is the extension number the recording was performed from.
File /tmp/9999-ivrrecording.wav had permissions set as 600 asterisk,asterisk.
I tried to manually change permissions to 660 asterisk,asterisk. That allowed me to proceed with the new recording registration in the system. But I still got:
[ERROR] REMOVING TEMPORARY RECORDING:
Make sure Asterisk is not running as root
Make sure Asterisk is not running as root. Please check it. The proper way to start and stop asterisk and FreePBX is by using the amportal start|stop command.
At the same time run amportal chown which will reset the permissions and ownership rights to the correct values.
without knowing a lot more about your setup it’s hard to guess. This a ISO build, hand build, if hand built who’s directions, etc…
None of the errors provided here make is clear that is is running as asterisk but imply that it is probably running as root. "[ERROR] REMOVING TEMPORARY RECORDING:
Make sure Asterisk is not running as root "
Let’s walk through the errors you provided one by one.
The first one: cp: cannot open `/tmp/9999-ivrrecording.wav’ for reading: Permission denied, Make sure you have entered a proper name
Make sure that you are only using the standard letters and numbers to start as many symbols cause a problem if the are not escaped correctly. Also remember if you are a windows user that there is a difference between upper and lower case in unix. (Don’t mean to insult just don’t know your background).
The second one:
[ERROR] REMOVING TEMPORARY RECORDING:
cp: cannot open `/tmp/9999-ivrrecording.wav’ for reading: Permission denied
Make sure Asterisk is not running as root
This is generated 95% of the time when asterisk is running as root instead of as asterisk. The proper way to start and stop asterisk with FreePBX is by using the amportal start and stop commands. the other 5% of the time it is from people who have hand build systems, and don’t follow the directions about setting up apache to run as the user asterisk or they stopped asterisk and started it again as root.
For the temp file the permissions and such were correct, they are also set by asterisk not FreePBX when the file was created.
[ERROR] SAVING RECORDING:
cp: cannot open /tmp/200-ivrrecording.wav' for reading: Permission denied Make sure you have entered a proper name [ERROR] REMOVING TEMPORARY RECORDING: cp: cannot open/tmp/200-ivrrecording.wav’ for reading: Permission denied
Make sure Asterisk is not running as root
build is from AsteriskNow 1.5. Nothing has been change from initial install except trunk configuration.