app_voicemail.c rights problem

Hi,

I have a problem with my vmail.cgi. In /var/spool/asterik/voicemail/ all foders and files are created with asterisk user rights. Asterisk runs with root rights so all folder have only 0700 permisions. My server apache runs with the rights of wwwrun account so it can’t acces to files and folders.

I have modifed this lines in app_voicemail.c :

#define VOICEMAIL_DIR_MODE 0700
#define VOICEMAIL_FILE_MODE 0600
in
#define VOICEMAIL_DIR_MODE 0770
#define VOICEMAIL_FILE_MODE 0660

After recompiling and reinstall it stil doesn’t work !!!

Do you have an idea please ?

Thanks a lot !

Please,

nobody could help me ? :unamused:

Thanks a lot

Nobody yet ?

Hi

Start * as asterisk ie su asterisk asterisk

Ian

Yes ianplain,

that’s was the solution with the ACL :

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/

It’s ok to run Asterisk under wwwrun process.

Thanks :stuck_out_tongue:

what is the step to recompile the file?