[Asterisk-Users] Ubuntu Migration

Tzafrir Cohen tzafrir at cohens.org.il
Tue May 24 00:01:27 MST 2005


On Wed, May 18, 2005 at 07:07:02AM +0100, Matthew Walster wrote:
> I've just migrated Asterisk from my old Gentoo system to an Ubuntu system, 
> copied across all the /etc/asterisk files and now it fails to work. After 
> brief looks, I find that it can't access:
> 
> /var/log/asterisk/messages
> /var/run/asterisk.ctl
> /var/run/asterisk.pid

If you want asterisk to run as its own user, it should be able to write
its own socket, probably. Better let it write things in its own
/var/run/asterisk owned by asterisk .

Ditto for /var/logs/asterisk . Especially if you also log CDR records
there. If you install asterisk manually don't forget to add proper
log-rotation commands there. The current default
/etc/logrotate.d/asterisk:

/var/log/asterisk/cdr-csv/Master.csv /var/log/asterisk/debug /var/log/asterisk/event_log /var/log/asterisk/messages {
        weekly
        missingok
        rotate 4
        sharedscripts
        postrotate
                /usr/sbin/invoke-rc.d asterisk logger-reload
        endscript
}

The ownership of the /dev/zap files in Debian Sarge is not by the user 
asterisk , rather by the group 'dialout' (why? mainly to allow 
co-existance with other packages that use zaptel) . This convention 
was set quite recently and I don't know if Ubuntu will follow it.

Should you follow those conventions? No. Those are just recommendations.
They will be followed by other Debian asterisk-related packages and
software, so I guess you should, if it doesn't cause too much trouble.

> 
> So I touched these files, and chown/chgrp'd then to user/group 
> asterisk/asterisk. Now, when I run asterisk through /etc/init.d/asterisk 
> (Ubuntu is a Debianalike) it says "Unable to set high priority".

Permissions? The init.d script you use changes to the user asterisk with
'start-stop-daemon' rather than letting asterisk do that on its own? The
Debian package used to have that problem, but it was some monthes ago.

Also I know that the Debian Sarge package has a one or two small patches 
for doing the SUID process properly.

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend



More information about the asterisk-users mailing list