On Thu, Feb 11, 2010 at 07:36:23AM -0500, Leif Madsen wrote:
> Jason Parker wrote:
> > Brian wrote:
> >> Each time the server is rebooted Asterisk duly
> >> deletes the manually created /var/run/asterisk directory - quite why it
> >> does this I just don't know - perhaps it is a bug?
> > 
> > Your assumption is incorrect.  Some Linux distributions will empty 
> > /var/run/ on 
> > boot, just as they do with /tmp/.  I do believe you're right, however, in 
> > suggesting that there is a bug in Asterisk.  It appears that Asterisk 
> > creates 
> > /var/run/asterisk/ during install and assumes that it will always exist.
> > 
> > Some of the sample init scripts (Debian) create that directory before 
> > starting 
> > Asterisk.  This should be done in all of them (or in Asterisk itself, 
> > maybe?).
> > 
> > Please report an issue on http://issues.asterisk.org/
> 
> For future reference, the issue reported is #16802.
> 
> https://issues.asterisk.org/view.php?id=16802

The report in the bug is not clear.

If you run Asterisk as non-root, asterisk should have write permissions
to the astvarrun directory. Thus it should be the subdirectory
/var/run/asterisk .

Packages on Debian has long ago defaulted to even prevent running as
root, and had astvarrundir set to /var/run/asterisk as a compile-time
default for quite some time.

The Ubuntu packages, based mostly on the Debian ones, had to face the
fact that Ubuntu deletes everything under /var/run by default at boot.
Thus the init.d script was fixed to (re)create that directory.

This fix made it eventually into the Debian packages, and also
(eventually, and independently) into the standard "debian" asterisk
init.d script.

So the questions to ask are, I believe:

* Should asterisk here be run as root? If so: why?
* Where should the astvarrundir be?

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.co...@xorcom.com
+972-50-7952406           mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to