pySerial- need help.

kamarudin samsudin kamarudin at
Wed Mar 30 23:55:46 CEST 2005

Hi all,

I try to invoke python serial script via my browser using PHP (exec
function). For the serial communication, i used pySerial module. It
fine when it run it as root but when i try to run it from browser, i
got this error in my httpd/error_log

  File "", line 9, in ?
  File "/usr/lib/python2.3/site-packages/serial/", line
153, in __init__
  File "/usr/lib/python2.3/site-packages/serial/", line
137, in open
    raise SerialException("Could not open port: %s" % msg)
serial.serialutil.SerialException: Could not open port: [Errno 13]
Permission denied: '/dev/ttyS0'

i tried chmod go+wr /dev/ttyS0 but i still got the error.

BTW, i used apache 2.0.52, PHP 4.3.10 and Fedora Core 3 

Thanks in advance.

kamarudin samsudin

More information about the Python-list mailing list