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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -