[asterisk-dev] Problems with zap following 1.4.6 install

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Jul 2 14:03:42 CDT 2007


On Mon, Jul 02, 2007 at 02:58:28PM -0300, Christian Villa Real Lopes wrote:
> this is looks like an asterisk-user question, but since I spent time 
> repying...
> 
> do you run asterisk like an user other than root ? if so perhapes your 
> problem is like mine some time ago (permission to your user "use" ZAP 
> devices)
> 
> I put the following line inside my zaptel init script
> /bin/chmod -R 0660 /dev/zap
> /bin/chmod ug+x /dev/zap
> /bin/chown asterisk:asterisk /dev/zap

That's a funny way of doing:

/bin/chmod 0660 /dev/zap/*
/bin/chown asterisk:asterisk /dev/zap

And anyway, assuming you use udev, the best way is to create those nodes
with proper permissions in the first place.

* They must not be world readable, because even opening a device for
  reading by a randim user has potentially bad results.
* I'm not sure about your distribution. In Debian files under /dev seem
  to be created with 0660 permissions by default (r/w to user and
  group, notihg to others). I can't find exactly where this is
  documented to be the default.

Hence the sole rule in the current Debian config that deals with
permissions is:

  SUBSYSTEM=="zaptel",    GROUP="dialout"

If I'd wat to aplpy all of your explicit configuration:

  SUBSYSTEM=="zaptel",    OWNER="asterisk", GROUP="asterisk", MODE=0660"

Make sure you have that line in your udev rules in the proper place.

What distribution do you use, anyway?

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+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-dev mailing list