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

Re: Little problem with rights on a script



On Sun, Nov 17, 2019 at 10:07:23AM -0500, Gene Heskett wrote:
> On Sunday 17 November 2019 09:59:52 Nicolas George wrote:
> 
> > Gene Heskett (12019-11-17):
> > > i have a similar situation with heyu, which runs as a normal user.
> > > But udev insists all the ttyUSB# ports are root:root, so I've put a
> > > couple lines in my rc.local for the last decade or so to make me own
> >
> > You could have read the doc for udev instead of wasting your time on a
> > fragile solution.
> >
> > Regards,
> 
> The docs for udev are too paranoid to show one how, and the next package 
> upgrade undoes your work anyway so why bother.

Sorry, but man 7 udev seems pretty clear to me. A bit terse, yes, but
complete and useful enough whenSomething like

  KERNEL=="ttyUSB0", MODE="0660", GROUP="dialout",

should roughly do (perhaps DEVPATH instead of KERNEL -- whatever floats
your boat). Go have a look into

  /lib/udev/rules.d/80-debian-compat.rules

to get an idea of how to set permissions on special device files.

And oh, the standard convention here is to use some special group
for a device file and to add those users supposed to much around
with that device to said group (e.g. "dialout", "cdrom", you name
it -- Debian comes with a bunch of those). Then you can set the
device to 0660, not 0666.

But those are just advises. It's your box.

Cheers
-- t

Attachment: signature.asc
Description: Digital signature


Reply to: