The system recordings macro (macro-systemrecording in /etc/asterisk/extensions.conf) does the saving of files in /tmp and not ASTVARLIB/sounds/custom. This means that the system recording module needs to copy the file from /tmp to ASTVARLIB/sounds/custom, and by this loosing the original permissions of the file.
While most of the users run apache as the user "asterisk", some of us, not only do not use apache, but they run the new httpd server as "www-data". What happens is that the new files are generated without read/write permissions to asterisk (only to www-data) and those funky IVR are useless.
The series of patches proposed here will so the temporary savings of files in ASTVARLIB/sounds/custom, with a "tmp-ivr" prefix, and the only thing needed to do on the wizards is to rename the files (an atomic command, which is always good).
I am still checking the effect of this patch on the system, but it seems to beahve quite good. I am happy.
The patches are for the 2.1.3 release, but can be ported to the trunk quite easly.