php - Serial port access denied -
i running apache web server on raspberry pi. have python code executes in index.php file follows:
<?php system("python /home/pi/python/foobar.py") ?>
the python script opens serial port, so:
ser = serial.serial() ser.port = "/dev/ttyusb0"
when run python script command line on raspberry pi, works perfectly. however, when browse site on computer, error message:
[errno 13] permission denied: '/dev/ttyusb0'
i have done research , found people run error because user doesn't belong dialout group. when using raspberry pi, belong it, , assume on computer, don't.
in summary, how permission access serial port on raspberry pi server?
Comments
Post a Comment