LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-18-2004, 05:24 AM   #1
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
[CLOSED] what is execvp?


As no one seems to be able to help me with this, pls can somebody tell me what is "execvp" and where is it normally located so I can check permissions etc. thx.

Last edited by jules_fraser; 04-08-2004 at 04:44 PM.
 
Old 01-18-2004, 06:12 AM   #2
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
http://www.qnx.com/developer/docs/mo.../e/execvp.html
 
Old 01-18-2004, 06:18 AM   #3
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Original Poster
Rep: Reputation: 15
Thanks for this LL, but the doc does not tell me where this exe is located. I need to know why http does not start and reports error: Starting httpd: execvp: Permission denied.

Any help would be appreciated.
 
Old 01-18-2004, 06:21 AM   #4
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
It is located in /etc/httpd/conf

But the question is why this file is missing and how?
 
Old 01-18-2004, 06:34 AM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
No no no, execvp is not a file, it's a function. It's trying to replace a running process with another, but failing because it doesn't have permission.

If you would look in the Errors section of the document that is linked, you would see (among other things):
Quote:
EACCESS
The calling process doesn't have permission to search a directory listed in file, or it doesn't have permission to execute file, or file's filesystem was mounted with the ST_NOEXEC flag.
 
Old 01-18-2004, 06:34 AM   #6
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Original Poster
Rep: Reputation: 15
I have just installed Apache2 and have just looked in both /etc/httpd/conf and /usr/local/apache2/conf and cannot find this file. But the error is "permissions denied" and so I am assuming that httpd must be calling it from somewhere. I have attached my /etc/init.d/httpd file to see if you can see where I may be going wrong. I changed the path for the modules and /etc/httpd, but this has not worked:

# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/apache2/bin/apachectl
httpd=/etc/httpd
prog=httpd
RETVAL=0

# Find the installed modules and convert their names into arguments httpd
# can use.
moduleargs() {
moduledir=/usr/local/apache2/modules
moduleargs=`

Should I change the path of: /etc/httpd to /usr/local/apache2?
 
Old 01-18-2004, 06:38 AM   #7
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
The Apache binary is usually not located in /etc (that's not for binaries!) Probably the error you're getting is the result of the file you're trying to execute not being executable, or the file system is mounted with noexec (see above). Usually if /etc mounted from it's own partition, noexec is set. Additionally I highly doubt /etc/httpd is the actual binary (it should be in /usr/local/bin, or some place very similar).
 
Old 01-18-2004, 06:44 AM   #8
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Original Poster
Rep: Reputation: 15
Pls advise exactly what directories, bar /usr/local/apache2 and files that I should scrap in order to do a complete new install of Apache? Whenever I just get shot of Apache2, I always have this same problem.

I have done a very basic install this time around and cannot understand what exactly this execvp process is calling. Best to start afresh because we are just going around in circles here and I am none the better for it.
 
Old 01-18-2004, 06:45 AM   #9
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
what happens when you try
/usr/sbin/httpd -k start

Do you have anything in /var/log/httpd/error_log that might shed
some light?
 
Old 01-18-2004, 06:54 AM   #10
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Original Poster
Rep: Reputation: 15
The last entry in /var/log/httpd/error_log was dated January 13, there has been nothing since then. I have also checked out/usr/sbin/httpd but the directory does not exist!

This is not something that I have to add in myself is it?

Am using Apache v 2.0.47.
./configure (default options)
make
make install

All ran with no errors.
 
Old 01-18-2004, 07:01 AM   #11
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
No i dont think u ahve to add it but at the red hat mailing list i read some time back, this fellow also had the same problem as u do, but he could start apache by issuing the command.

BTW execvp also exists in /bin/sh

Last edited by LinuxLala; 01-18-2004 at 07:03 AM.
 
Old 01-18-2004, 07:11 AM   #12
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Original Poster
Rep: Reputation: 15
OK thanks LL. Apache from removing /usr/local/apache2, where else do I have to delete in order to remove httpd completely to start from scratch?
 
Old 01-18-2004, 09:35 AM   #13
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
If you want to remove Apache2, then remove httpd-2.0.40-21
So, in your case, you would type:
rpm -e httpd-2.0.40-21 redhat-config-httpd-1.0.1-18

You can(and should ) also follow up this thread at LQ
http://www.linuxquestions.org/questi...003/08/1/79201

 
Old 01-19-2004, 01:56 PM   #14
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Original Poster
Rep: Reputation: 15
Thx for all your efforts. I managed to reinstall httpd and it works well now with php.
 
Old 01-19-2004, 04:11 PM   #15
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Some how you lost the binary file (perhaps you moved things around incorrectly?). Next time you want to know where something is, try
# find / -name "httpd"
(or substitute the file you're trying to find in place of "httpd")

You'll probably want to output that to a file with >/tmp/findresults.txt or something like that, or pipe it to less with |less. If you think you found the right file, do an ls -l /path/file and see if it has 'x' set in it's permissions, i.e. execute. That's not a sure-fire way to determine if it's the right file, but it will get you started in the right direction.

BTW there are more sophisticated ways to do the above, but that's the 30 second off-the-top-of-my-head version.

Basically what I think was happening was you were trying to execute either a plain text file or a directory.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Execvp With Quotation Marks amitbern Programming 10 11-25-2005 10:28 AM
execvp vs. shell wiredj Programming 4 04-14-2004 08:24 AM
a question about execvp captainstorm Programming 15 10-30-2003 04:36 AM
execvp rose_bud4201 Linux - General 1 02-23-2003 02:54 AM
location of execvp? rachelkoncewicz Linux - General 2 11-15-2002 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration