Webcam visible only as root

I followed the handbook to installation the webcam here.

I can view the webcam as root but not as a regular user. I added the user to the group as you can see below :
Code:
# pw group show webcamd
webcamd:*:145:vikram

$ id vikram
uid=1001(vikram) gid=1001(vikram) groups=1
001(vikram),145(webcamd)

$ pwcview
Failed to access webcam: Permission denied
******************************************
*****************
Make sure you have connected your webcam t
o the root hub
or to a USB 1.1 hub, also check your dmesg
 for any errors.
******************************************
*****************

Any idea why this works as root and not as user ?
 
looks like i have permissions . is there anyother place i should be looking ?

Code:
ls -lr  /dev/usb/
total 0
crwxrwxrwx 1 root operator 0x9c Feb 1 10:05 1.4.0*
crwxrwxrwx 1 root operator 0x93 Feb 1 10:05 1.3.3*
crwxrwxrwx 1 root operator 0x92 Feb 1 10:05 1.3.2*
crwxrwxrwx 1 root operator 0x91 Feb 1 10:05 1.3.1*
crwxrwxrwx 1 root operator 0x8f Feb 1 10:05 1.3.0*
crwxrwxrwx 1 root operator 0x8e Feb 1 10:05 1.2.3*
crwxrwxrwx 1 root operator 0x8d Feb 1 10:05 1.2.1*
crwxrwx--- 1 root operator 0x8a Feb 1 10:05 1.2.0*
crwxrwxrwx 1 root operator 0x40 Feb 1 10:05 1.1.1*
crwxrwxrwx 1 root operator 0x35 Feb 1 10:05 1.1.0*
crwxrwxrwx 1 root operator 0xb2 Feb 1 16:17 0.6.1*
crwxrwxrwx 1 root operator 0xb0 Feb 1 16:17 0.6.0*
crwxrwxrwx 1 root operator 0x1cd Feb 1 16:17 0.5.7*
crwxrwxrwx 1 root operator 0x1cc Feb 1 16:17 0.5.6*
crwxrwxrwx 1 root operator 0x1c8 Feb 1 16:17 0.5.5*
crwxrwxrwx 1 root operator 0x1c7 Feb 1 16:17 0.5.4*
crwxrwxrwx 1 root operator 0x1c6 Feb 1 16:17 0.5.3*
crwxrwxrwx 1 root operator 0x1c5 Feb 1 16:17 0.5.2*
crwxrwxrwx 1 root operator 0x1c4 Feb 1 16:17 0.5.1*
crwxrwxrwx 1 root cups 0xb3 Feb 1 16:17 0.5.0*
crwxrwxrwx 1 root operator 0xac Feb 1 16:17 0.4.2*
crwxrwxrwx 1 root operator 0xab Feb 1 16:17 0.4.1*
crwxrwxrwx 1 root operator 0xa5 Feb 1 16:17 0.4.0*
crwxrwxrwx 1 root operator 0x9a Feb 1 16:17 0.3.3*
crwxrwxrwx 1 root operator 0x99 Feb 1 16:17 0.3.2*
crwxrwxrwx 1 root operator 0x98 Feb 1 16:17 0.3.1*
crwxrwxrwx 1 root operator 0x96 Feb 1 16:17 0.3.0*
crwxrwxrwx 1 root operator 0x95 Feb 1 16:17 0.2.1*
crwxrwxrwx 1 root operator 0x8c Feb 1 16:17 0.2.0*
crwxrwxrwx 1 root operator 0x3f Feb 1 10:05 0.1.1*
crwxrwxrwx 1 root operator 0x33 Feb 1 10:05 0.1.0*
 
If you didn't, you need to log out and log in back after adding your user to a group.

Also, you can specify which user and group to give access to webcam.
From multimedia/droidcam's pkg-message:

Code:
[
{ type: install
  message: <<EOM
Connect your phone with USB then follow these steps but
"-d", "-N" and "-S" parameters may be different for you.
To learn them, just run webcamd as root and without parameters.
Don't forget to Change $USER and $GROUP according to your normal user.
    # kldload cuse
    # webcamd -d ugen0.2 -N Xiaomi-Redmi-Note-12 -S 1234567 \
      -M 0 -v 0 -B -U $USER -G $GROUP -c v4l2loopback
Now, you can run the program and use it.
EOM
}
]
 
I set up my camera according to this instruction. It works both in root and under a regular user.
https://www.adminbyaccident.com/fre...re-freebsd-to-use-a-webcam-version-12-and-13/
# usbconfig
Bash:
ugen3.2: <AONI ELECTRONIC CO.LTD Canyon CNS-CWC5 Webcam> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
# webcamd -s -l
Bash:
webcamd [-d ugen3.2] -N AONI-ELECTRONIC-CO-LTD-Canyon-CNS-CWC5-Webcam -S 20200706001 -M 0
# id root
Bash:
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator),44(video)
# id none
Bash:
uid=1001(none) gid=1001(none) groups=1001(none),0(wheel),5(operator),44(video),145(webcamd)
Test:
# pwcview -s svga -f 30
Bash:
Webcam set to: 800x600 (svga) at 30 fps
 
Why such an old version (v.1.1) and not 2.x or higher?
How tf shall I know? It's not my computer. (Maybe she's using some Daguerreotype device at USB 1 😁)
I simply quoted the OP's message, and pointed out that for an user to have access to USB you also need user's permission on USB.
Not pionting out in detail how to do that, 'cause that's in the HB.
Also not pointing out that
crwxrwxrwx 1 root operator 0x8f Feb 1 10:05 1.3.0*
does not show user permissions, but only who owns the files, 'cause that's basics.
 
Back
Top