[asterisk-users] Newbie Asterisk: Install Asterisk as non-root

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat May 17 09:21:29 CDT 2008


On Fri, May 16, 2008 at 06:32:30PM -0500, James Sneeringer wrote:
> On Fri, May 16, 2008 at 3:04 AM, Lee, John (Sydney)
> <John.Lee at compuware.com> wrote:
> > First of all, thanks Philipp, Alan, Tzafrir and James for your valuable
> > comments.  I have listed below the exact list of commands to run for
> > reinstalling asterisk 1.4.* as non-root on a Redhat / Fedora distro.
> > Hope others can benefit.
> >
> > I have the following comments/questions though:
> > 1) #####What is safe_asterisk used for actually?  I did not touch it in
> > my modification because I don't know when is it triggered?
> 
> The safe_asterisk script monitors the actual asterisk process, and if
> it dies for some reason, 

Not "for some reason". For instyance, if asterisk decides to die the
script should not restart it. And if it got a SIGTERM? (e.g.: from init
on shutdown?)

> it restarts it and optionally notifies you.
> It's just a precaution. MySQL is often run under a script called
> mysqld_safe for the same reason.
> 
> > 2) #####I do not actually know whether we really need to modify
> > /etc/asterisk/asterisk.conf?  Is this file read by asterisk at all?
> > Seems like an important file name - asterisk.conf?
> 
> It is read by asterisk, but whether you need to change any of the
> defaults really depends on your environment. Most of the options in it
> have equivalent command-line options, so you might want to use
> asterisk.conf instead of modifying the startup script (which could be
> overwritten the next time you upgrade).

Also note that asterisk.conf options override command-line options (and
not the other way around, as you might have learned to expect from most
other applications).

> 
> > 4) There is an additional chmod to run for letting voicemail.conf to be
> > written by group asterisk.
> 
> What I found was that /etc/asterisk also needs to be writable by the
> asterisk user, because asterisk will unlink and recreate the file, so
> it needs to be able to write to the directory, not just the file. You
> can protect yourself a little bit by setting the sticky bit on
> /etc/asterisk, so even if asterisk goes nuts, it can't whack files it
> doesn't actually have write permissions on.
> 
> chmod g+w /etc/asterisk/voicemail.conf
> chmod g+w,+t /etc/asterisk

Question: what does it take to move the voicemail file from
/etc/asterisk/voicemail.conf to /etc/asterisk/writble/voicemail.conf ?

Patch voicemail.conf and leave a compatibility symlink for the others?

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



More information about the asterisk-users mailing list