[asterisk-users] loosening voicemail file permissions formsg????.txt and msg????.wav

Guerid Salim salim.guerid at heig-vd.ch
Wed Nov 8 00:10:42 MST 2006


HI,

 

I’ve had the same problem, and have done the same modification in the
app_voicemail.c but without success.

It’s a bug related in
http://groups.google.ch/group/linux.debian.bugs.dist/browse_thread/thread/e4
352f488af374bf/c667bae7bdc59473?lnk=st
<http://groups.google.ch/group/linux.debian.bugs.dist/browse_thread/thread/e
4352f488af374bf/c667bae7bdc59473?lnk=st&q=app_voicemail.c+Bug%23330132&rnum=
1&hl=fr#c667bae7bdc59473>
&q=app_voicemail.c+Bug%23330132&rnum=1&hl=fr#c667bae7bdc59473

The only way I’ve found to solve this problem is to make asterisk running
under the user you want to access to the messages. You have to change add
some permissions to Asterisk folders, and can use ACL for that in this way :


 

setfacl -m u:wwwrun:rwX /var/run 
setfacl -m u:wwwrun:rwX /usr/sbin/asterisk 
setfacl -Rm u:wwwrun:rwX /var/log/asterisk/ 
setfacl -Rm u:wwwrun:rwX /var/log/asterisk/ 
setfacl -Rm u:wwwrun:rwX /var/spool/asterisk/ 
setfacl -Rm u:wwwrun:rwX /var/lib/asterisk/

 

Then in this exemple you can run asterisk with wwwrun user.

 

An other way is to launch a script Perl for example in the dialplan which
check files/folsers permission when appends a hang up to any channel.

 

Hope that can help you

 

Salim

 

  _____  

De : asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] De la part de Scott Keagy
Envoyé : mardi, 7. novembre 2006 20:22
À : Asterisk Users Mailing List - Non-Commercial Discussion
Objet : [asterisk-users] loosening voicemail file permissions formsg????.txt
and msg????.wav

 

HI folks,

 

I figured out where in the source code to hack the .wav file permissions
which were set too restrictive for me, but I can’t figure out how to do the
same for the .txt file.

 

Looks like the voicemail.c file sets it nicely for asterisk1.4beta3 using a
#define statement early on, but msg????.txt  comes out with permissions 0600
and there are no umask entries that affect how asterisk is started (if
anything it would be 022).

 

I’ve grepped through the entire source tree from the expanded tarball, and
changed every place where it says 0600 to 0666 and recompiled, but still no
luck. I’ve grepped for umask entries like 077 that might cause the problem,
but again no luck.

 

My work-around right now is a cron-job that chmods these directories every
minute, but this is ridiculous.

 

Anyone solved this?

 

Thanks,

Scott

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061108/4501131c/attachment.htm


More information about the asterisk-users mailing list