[Asterisk-Dev] Creating VoiceMail File Permissions

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Jun 16 08:52:49 MST 2005


On Thu, Jun 16, 2005 at 10:37:29AM -0400, Michael Stearne wrote:
> On 6/16/05, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
> > On Thu, Jun 16, 2005 at 02:46:22AM -0400, Michael Stearne wrote:
> > > I am looking to have the files that are created by the app_voicemail
> > > system to have a 0777 permission by default instead of the default
> > > 0700.  In app_voicemail.c I have changed all the directory creations
> > > to 0777 but can't figure out how to change the files (wavs, gsm, etc.)
> > > created to 777.  The topic is discussed here but I can't find the
> > > message containing the patch.
> > >
> > > http://lists.digium.com/pipermail/asterisk-users/2003-May/011845.html
> > 
> > Now, why would you want that? chmod 666/777 is usually in indication of
> > a missing chown/chgrp.
> 
> I want those permissions because I would like the files created by
> voicemail to be accessible by the web server.  Should maybe I have
> Asterisk be run by the apache user?

Then the file should be created with a group whose members are both
asterisk and apache.

So maybe the question should be: "How do I tell Voicemail to create the
voicemail files with a certain group".

Obvious answer (untested): 

  chgrp -R thatgroup /path/to/vmdir
  find /path/to/vmdir -type d | xargs chmod 2770 

> 
> > 
> > Oh, and look into the umask of the user under which Asterisk runs.
> 
> I am usually running it as root.  

A bad start. But then again, root can read any file so you won't have
much problem picking up the right group.

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list