Re: Access right on files from CGI script
I would say you should set up suexec to let the user that Apache runs as execute those specific commands as a privaleged user. But use suexec with EXTREME care. Issac bo wrote: Hello gurus, I am notivice on Apache configuration. I wrote a CGI program, which will display some system status on the client PC's browser window. This CGI program will execute a couple of system command under /sbin with reading some system status from /proc. I have no problem to access or execute any file or binary under /www/cgi-bin but I have an access problem to other system directories like /sbin or /proc. I followed the apache configuration document and I modified directory and created .htaccess file under /sbin but it did not help. How do I allow those files accessible from the CGI script? Please help me out. Thanks in advance, Bo
Access right on files from CGI script
Hellogurus,I am notivice on Apache configuration.I wrote a CGI program, which will displaysome system status on the client PC's browser window.This CGI program will execute a couple of system commandunder /sbin with reading some system status from /proc.I have no problem to access or execute any file or binary under /www/cgi-binbut I have an access problem to other system directories like /sbin or/proc.I followed the apache configuration document and I modified directory andcreated .htaccess file under /sbin but it did not help. How do I allow thosefiles accessiblefrom the CGI script? Please help me out.Thanks in advance,Bo
Re: Access right on files from CGI script
At 5:39 PM -0800 4/4/02, bo wrote: How do I allow those files accessible from the CGI script? The problem has nothing to do with Apache. The user that the Apache process is running as does not have access to those files. You need to either open up the permissions on /sbin to more users (probably not a good idea), or change who Apache runs as (not really a terribly good idea either), or make some custom commands that do what you want, but can only be run by Apache, and only with arguments that you have very carefully specified (rather difficult). Or you could go with security-by-obscurity model and make private versions of the commands that can only be read and run by the Apache user. -- Kee Hinckley - Somewhere.Com, LLC http://consulting.somewhere.com/ [EMAIL PROTECTED] I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.
Re: Access right on files from CGI script
or of course, you could use the 'group's feature and put the user apache runs as in the right groups and give that group the permissions to run the files you want in /sbin... On Fri, 2002-04-05 at 14:12, Kee Hinckley wrote: At 5:39 PM -0800 4/4/02, bo wrote: How do I allow those files accessible from the CGI script? The problem has nothing to do with Apache. The user that the Apache process is running as does not have access to those files. You need to either open up the permissions on /sbin to more users (probably not a good idea), or change who Apache runs as (not really a terribly good idea either), or make some custom commands that do what you want, but can only be run by Apache, and only with arguments that you have very carefully specified (rather difficult). Or you could go with security-by-obscurity model and make private versions of the commands that can only be read and run by the Apache user. -- Kee Hinckley - Somewhere.Com, LLC http://consulting.somewhere.com/ [EMAIL PROTECTED] I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.