Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2018 11:00:51 +0200
From:      Gary Jennejohn <gljennjohn@gmail.com>
To:        shreyank amartya <shreyankfbsd@gmail.com>
Cc:        hps@selasky.org, freebsd-usb@freebsd.org
Subject:   Re: usbconfig lack of device or permission
Message-ID:  <20180918110051.4904ba9b@ernst.home>
In-Reply-To: <CAD9jf8BdPk0gs_tiUah_7F-8m7L7hXo0SwzbQGgU2N9L9qJP%2BA@mail.gmail.com>
References:  <CAD9jf8DEXB-KO5s98jSH3Kj-N6jgyhgGvxFoWO-=iTsY-hqoVg@mail.gmail.com> <9a50285b-44a7-d8c2-3c42-ed282b0a408d@selasky.org> <CAD9jf8B58=LPW_RpvQiceSi66dPTwnQyYryPnqtwaqzHD2AMZw@mail.gmail.com> <0e799c90-ee0b-3b92-acda-8efee6eedc68@selasky.org> <CAD9jf8B27rKUqb2s9cqzWNEhnUZ2NpS2FSBgZQ6-7rF4NcBH6w@mail.gmail.com> <71f67595-45a1-9048-31b8-e32eb3bb74de@selasky.org> <CAD9jf8DV8MPR21o5R4aN08wcvyw%2BP-9C_Vwpe=0gZKLZt2%2BW8w@mail.gmail.com> <CAD9jf8BdPk0gs_tiUah_7F-8m7L7hXo0SwzbQGgU2N9L9qJP%2BA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Sep 2018 12:14:29 +0530
shreyank amartya <shreyankfbsd@gmail.com> wrote:

> Okay, so I'm able to use usbconfig once I chown /dev/usb/*. I don't
> understand why adding my user to operator group is not enough instead of
> chowning everything.
> 

chown is the wrong approach.  You need to chmod 660 all the
entries under /dev/usb and add yourself to the operator group.

This is why adding yourself to the operator group does not
normally work:

ls -l /dev/usb/*
crw-------  1 root  operator  0x37 Sep 18 08:43 /dev/usb/0.1.0
crw-------  1 root  operator  0x7e Sep 18 08:43 /dev/usb/0.1.1
crw-------  1 root  operator  0x8d Sep 18 08:43 /dev/usb/0.2.0
[etc]

Only root has read/write permission.  The chmod also gives the
operator group read/write permission.

> On Mon, Sep 17, 2018 at 4:51 PM shreyank amartya <shreyankfbsd@gmail.com>
> wrote:
> 
> > > ^^ this is not root :-)  
> > If I log in as root, usbconfig works. I want to make it work when i'm
> > logged in as a normal user (amd).
> >  
> > > Expected, unless you chown the packet filtering devices.  
> > Please elaborate on how I can i do this?
> >
> > On Mon, Sep 17, 2018 at 4:39 PM Hans Petter Selasky <hps@selasky.org>
> > wrote:
> >  
> >> On 9/17/18 12:25 PM, shreyank amartya wrote:  
> >> > amd@amd-sham:~ % whoami
> >> > amd  
> >> ^^ this is not root :-)
> >>  
> >> >
> >> > amd@amd-sham:~ % usbdump -i usbus0 -s 255 -f 5
> >> > usbdump: Could not open BPF device: Permission denied  
> >>
> >> Expected, unless you chown the packet filtering devices.
> >>


-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180918110051.4904ba9b>