3.2. Groups and Permissions
It is a good idea to be sure that your user account can access the device once all modules are loaded and device nodes created. The most security-conscious way to do that is to add access for a particular group. On my system, the members of the group 'video' are allowed to use the webcam, scanner and other photographic devices. The way to accomplish this is to first change the ownership of the devices in /dev like so (as root):
# chown root.video /dev/usb/video*
...where root.video are the owner and group the device will now belong to. Obviously, the specific command will vary by your system and the type of device. It is important that you change the ownership of the device node itself and not the symlink; symlinks' ownerships are affected only by changing the parent devices or files they point to.
To see if your user account is a member of the group in question, as root issue the following command: grep -e video /etc/group . You should see something like the following:
video:x:44:
...where '44' is the group number. Since no members follow the last colon in the 'video' group, we can add them, let's say user 'jhs' with the command
# adduser jhs video
After this, it's simply a matter of allowing read and write access for the user in question of the device like so:
# chmod g+rw /dev/v4l/video0
...where g+rw means add r ead and w rite access for g roup. See the documentation for chmod (man chmod or info chmod ) for further info.
Prev
Home
Next
Enabling Support for Your (Webcam) Hardware in Linux
Framegrabbing Applications
* License

