On Fri, Jan 09, 2004 at 10:26:32AM -0500, Herbert Graf wrote: > > On Thu, 8 Jan 2004, Herbert Graf wrote: > > > I have a script on a linux machine that runs a program that accesses the > > > parallel port. It seems that I can only access the port as > > root. The problem > > > is I'd like to run the script as apache (in the cgi-bin). > > > > > > I've tried setuid but that fails. Anyone know how I might open > > up hardware > > > access to user apache? Or how to get apache to run the script AS root? > > > > Can't you chown the parallel port device? "chown apache:apache /dev/lp0" > > or something? > > It's acessing the port directly. Thanks, TTYL To clarify, it's using the ioperm call to facilitate access. This mechanism doesn't use the driver associated with /dev/lpX, so the permissions on that port. Take a read here for more details: http://www.tldp.org/HOWTO/IO-Port-Programming-2.html BAJ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.