The call to give permissions to non-root programs for a range of i/o ports is: ioperm() As in, ioperm(0x378,3,1) (from root) to "open" the SPP. I use it in a binary to open the parallel port (for streaming data to an LED sign) in an embedded linux system. The executable is suid root, and it drops root privileges right after this call. According to the manpage, ioperm() settings are inherited to processes started with exec(), so you could have a setuid binary that calls ioperm() and then exec()s your perl script. That perl script should be able to use the parallel port. Let me know how it works out. Jesse Herbert Graf wrote: >>Are you sure the script will run without accessing the port? >>Have you tried commenting out that part and running the script as >>apache (or whatever uid apache is running as?) Also, if your >>script runs with a gid the same as /dev/lp* and the mode for >>/dev/lp* is 660 or better it should work. > > > The script is working fine since apache returns the right content string > and if I take out the call the to the program that accesses the port > everything works out fine. > > As for the program, I didn't write it so I don't know how it accesses the > port, I believe it is doing it directly (it's not accessing a printer). All > I know is if I run the program as root everything is fine, if I run it as > apache I get an "access to port=0x378 denied", or something like that. > Thanks, TTYL > > ---------------------------------- > Herbert's PIC Stuff: > http://repatch.dyndns.org:8383/pic_stuff/ > > -- -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.