[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /dev/ttyS0 permissions changing...



Quoting Bob Hilliard (bob@bobhilliard.net):
> Hugo van der Merwe <hugovdm@mail.com> writes:
> 
> > Something on my machine is periodically changing /dev/ttyS0's
> > permissions to 640, whereas it needs to be 660 to use the modem
> 
>      ppp changes the permissions to 640 on the device it is using, and
> restores them when it exits.  If it exits abnormally (crash, kill -9,
> etc) the permissions are not restored.  I have suspected that it does
> not always restore them on a normal exit, but haven't been able to
> prove that to my satisfaction.

I think the problem when using wvdial is simply that the latter is
too impatient. Wvdial claims that is sends SIGTERM to pppd, waits
2 seconds and then sends SIGKILL. Looking at my logs, I can see
that pppd typically takes 3 seconds to close down when asked by
the other end. Presumably resetting the port permissions must be
one of the last things to be done, after any "down" scripts have
run.

To Hugo:

By all means copy the modem init strings from wvdial to
your ppp configuration.

Why does pppd set g-w? Because otherwise, any member of the dialout
group could write to the serial port while a PPP connection was in
progress, perhaps changing its speed or other characteristics for
example.

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



Reply to: