Wrong device permision

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Dec 21 08:40:58 UTC 2005


Hi

On Tue, Dec 20, 2005 at 08:46:15PM +0100, Michal Gust wrote:
> Package: zaptel-source
> Version: 1:1.2.1-1

Bug reports are submited to submit at bugs.debian.org . Anyway, it would
have ended up here anyway,

> 
> Dear team,
> 
> Asterisk init script starts Asterisk under asterisk user. Devices under 
> /dev/zap are created with 644 permission under user who compile the 
> source code - usually root. 

Asterisk is not the only user of zaptel . Thus those devices are created
with permissions 660 root.comm  (This is done in the postinst script of 
the package zaptel) and asterisk is added to the group comm (this is
done in the postinst script of Asterisk)

> Therefore Asterisk started with default init 
> script doesn't have permission to access to it. I think the right way to 
> resolve problem is to change Makefile in zaptel-source package 

Regardless of the changes you want to make, the right place for them is
in the package zaptel . zaptel generates all the userspace tools and
settings. zaptel-source allows generating a kernel-specific modules
package (zaptel-modules-<kernel-version>, "zaptel-modules") that 
includes only the modules themselves. You may have multiple
zaptel-modules packages installed on your system, and only the one for
the current kernel version does something useful. Thus it should not
include any redundant userspace settings.

> to set 
> appropriate permission when installing modules ("makefile install" 
> command). Example of possible patch follows.
> 
> 315a316,319
> >        chown asterisk.asterisk $(INSTALL_PREFIX)/dev/zap/ctl
> >        chown asterisk.asterisk $(INSTALL_PREFIX)/dev/zap/timer
> >        chown asterisk.asterisk $(INSTALL_PREFIX)/dev/zap/channel
> >        chown asterisk.asterisk $(INSTALL_PREFIX)/dev/zap/pseudo
> 319a324
> >               chown asterisk.asterisk $(INSTALL_PREFIX)/dev/zap/$$N; \

Also, it generally helps to use unified diffs (diff -u), as they give
context and are generally easier to read.

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



More information about the Pkg-voip-maintainers mailing list