On Fri, 2004-01-09 at 18:35, Herbert Graf wrote: > > On Fri, 2004-01-09 at 15:37, Herbert Graf wrote: > > > Was wondering if someone here would be able to help me with something. > > > > > > 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? > > > > > > Thanks, TTYL > > > > Use sudo. Edit /etc/sudoers and include something like this; > > > > apache ALL = NOPASSWD: > > > > Read the man page for sudoers. The decode goes something liek this, > > > > apache The user to whom this entry aplies > > ALL The machines on which the user may run the command > > NOPASSWD: Do not require the user to enter their password > > <...> The command the user may run as root > > I looked into sudo, it doesn't appear to be an option, unless you can think > of a way to have apache use it when calling a script? I want to access a URL > that calls the script, the script returns image data. Thanks, TTYL Running anything as root is always a bit dicey if you ask me. I'll have a sift around and see what surfaces. Rob -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.