i have a cgi file and in that i am calling the system('ls')
system('ls');
its returning a return code of -1 ,permission denied.
so i added apache user having permissions to execute the ls command in
/etc/sudoers file.
and relaced the system function with
system("sudo","ls");
still i am getting the above same error.
can anyone help me out in solving this.
thanks.
--
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.
HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
What language is your CGI script written in? Presumably this is on a
UNIX box? What makes you think that when system() returns -1 it's a
"permission denied" error on the program itself?
Incidentally, do you know for sure what directory the CGI process is
actually executing in? (Not executing *from*, but executing *in*.)
> so i added apache user having permissions to execute the ls command in
> /etc/sudoers file.
Arrgghh. What reasoning did you apply to determine that the apache user
didn't have permissions to run "ls"?
Chris