Google Groups Home
Help | Sign in
system call returns return code -1
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
ganesh  
View profile
 More options Sep 11 2006, 1:58 am
Newsgroups: comp.infosystems.www.authoring.cgi
From: "ganesh" <gmachk...@gmail.com>
Date: Sun, 10 Sep 2006 23:58:38 CST
Local: Mon, Sep 11 2006 1:58 am
Subject: system call returns return code -1
Hi,

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Davies  
View profile
 More options Sep 12 2006, 5:08 pm
Newsgroups: comp.infosystems.www.authoring.cgi
From: Chris Davies <chris-use...@roaima.co.uk>
Date: Tue, 12 Sep 2006 15:08:32 CST
Local: Tues, Sep 12 2006 5:08 pm
Subject: Re: system call returns return code -1

ganesh <gmachk...@gmail.com> wrote:
> i have a cgi file and in that i am calling the system('ls')
> its returning a return code of -1 ,permission denied.

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

--
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google