/dev/video0 permissions - Raspberry Pi Forums
hello everyone.
called 1 webcam raspberry , have python script calls command fswebcam php exec(); function. can run fswebcam command php not working.
how best way enabling /dev/video0 user without having call sudo?
note: added user , apache user video group still need sudo. output
called 1 webcam raspberry , have python script calls command fswebcam php exec(); function. can run fswebcam command php not working.
code: select all
<?php echo exec('fswebcam /home/aos/4.jpg'); ?>
note: added user , apache user video group still need sudo.
code: select all
$ $ grep video /etc/group video:x:44:pi,aos,www-data $ id aos uid=1001(aos) gid=1002(aos) groups=1002(aos),20(dialout),44(video) $ id www-data uid=33(www-data) gid=33(www-data) groups=33(www-data),20(dialout),44(video)
code: select all
$ fswebcam img/4.jpg --- opening /dev/video0... trying source module v4l2... error opening device: /dev/video0 open: permission denied trying source module v4l1... error opening device: /dev/video0 open: permission denied unable find source module can read /dev/video0.
maybe add udev rule such as: root, run command create new .rules file: , reboot
code: select all
subsystem=="video0", group="video", mode="0660"
code: select all
echo 'subsystem=="video0", group="video", mode="0660"' > /etc/udev/rules.d/10-webcam.rules
raspberrypi
Comments
Post a Comment