Accessing a serial port from a web server May 18, 2013
Antre du Tryphon

Accessing a serial port from a web server

May 18, 2013 · Admin Ubuntu 11.10 Unix Ubuntu 11.04 Ubuntu Raspberry PI Wheezy Ubuntu 12.04

On most Linux distribution, it is impossible to access a serial port (ex. /dev/ttyS0) from a web server such as Apache or lighttpd using a cgi. Simply add the user under which the web server runs (www-data for example) to the group dialout. To do so, use vigr from the command line and add the user on the dialout group line. Such a line will typically look like:

dialout:x:20:myuser,www-data

Copyright 2012–2026, Claude "Tryphon" Théroux