error when accessing a uart device from a cgi python script -


i'm trying access uart device /dev folder control robot. i'm trying internet using cgi python script. code works fine when execute on command line when executes through server 500 error. i'm pretty sure sort of permissions problem don't know how solve it. if knows going on here or how fix it, appreciated.

i can post python code if liked see don't think problem in code, rather in execution of code.

thanks in advance,

michael,

maybe solotion can checking group of device file:

adam@sabayon ~ $ ls -lash /dev/ttys*                                                                                                                                                                                              0 crw-rw---- 1 root uucp 4, 64 03-10 13:20 /dev/ttys0                                                                                                                                                                             0 crw-rw---- 1 root uucp 4, 65 03-10 13:20 /dev/ttys1                                                                                                                                                                             0 crw-rw---- 1 root uucp 4, 66 03-10 13:20 /dev/ttys2                                                                                                                                                                             0 crw-rw---- 1 root uucp 4, 67 03-10 13:20 /dev/ttys3  

for me uucp. , add user start cgi script group (for system uucp). have remember other cgi scripts started user allowed access uart.

edit:

for apache webserver looks suexec can solution you.

the suexec feature provides apache users ability run cgi , ssi programs under user ids different user id of calling web server. normally, when cgi or ssi program executes, runs same user running web server.

so looks can create new user cgi script configure correctly , use script apache.

here documentation suexec: http://httpd.apache.org/docs/2.0/suexec.html

i never used it, hope help.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -