LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-20-2013, 09:12 AM   #1
gadikota
LQ Newbie
 
Registered: Dec 2010
Posts: 26

Rep: Reputation: 0
Unusual Apache issue on my server !!!


Experts,

I have a custom application built(previous vendor built it and we took over it with no KT) using CGI and apache. looking at the conf file the apache was serving pages as root as the CGI invokes commands that need to be run as root.(I know this is a bad idea of running apache as root).

All we did is to reboot the server and now the site doesnt come up and httpd service is in "maintenance" state with error.

"Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n
[ Mar 20 09:53:17 Method "start" exited with status 1 ]"

Couple of questions:

1) would a reboot change any apache binaries that would cause this and need a rebuild of apache ?
2) Is there a easy fix that i can bring the application up by letting apache run as root?

I have been trying to get it working from last 2 days and no luck till now. Any help would be much appreciated.

Thanks in advance.
 
Old 03-20-2013, 09:18 AM   #2
#root
Member
 
Registered: Mar 2013
Location: in my house
Distribution: Ubuntu,Backtrack,Fedora
Posts: 38

Rep: Reputation: 5
what was the command???

Quote:
service httpd start
or

Quote:
service httpd restart

??????
 
Old 03-20-2013, 09:23 AM   #3
gadikota
LQ Newbie
 
Registered: Dec 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Thank you for your reply #root.

I have already done that. HTTPD was online before and after the reboot, it wont come out of maintenance mode. The error i get is that i cant run apache as root.
 
Old 03-20-2013, 09:37 AM   #4
#root
Member
 
Registered: Mar 2013
Location: in my house
Distribution: Ubuntu,Backtrack,Fedora
Posts: 38

Rep: Reputation: 5
oh yes you did
but i was saying that problem like this occur when you start the service which was already in the start state
for eg you say "service httpd start" while the service was already in the start state
so it is always recommended to use "service httpd restart"
that was the reason, i was asking that which one of the two command was used

Last edited by #root; 03-20-2013 at 09:47 AM.
 
Old 03-20-2013, 09:54 AM   #5
gadikota
LQ Newbie
 
Registered: Dec 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Wink



Used

Code:
service httpd stop
and then

Code:
service httpd start
still the problem exists .
 
Old 03-20-2013, 01:39 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by gadikota View Post
Experts,
I have a custom application built(previous vendor built it and we took over it with no KT) using CGI and apache. looking at the conf file the apache was serving pages as root as the CGI invokes commands that need to be run as root.(I know this is a bad idea of running apache as root). All we did is to reboot the server and now the site doesnt come up and httpd service is in "maintenance" state with error.
Code:
"Error: Apache has not been designed to serve pages while
        running as root.  There are known race conditions that
        will allow any local user to read any file on the system.
        If you still desire to serve pages as root then
        add -DBIG_SECURITY_HOLE to the CFLAGS env variable
        and then rebuild the server.
        It is strongly suggested that you instead modify the User
        directive in your httpd.conf file to list a non-root
        user.
[ Mar 20 09:53:17 Method "start" exited with status 1 ]"
Couple of questions:
1) would a reboot change any apache binaries that would cause this and need a rebuild of apache ?
No. However, if you just updated the server (you don't say anything about what preceded the failure, what changed, what you were doing, etc.), then the Apache binary may have been updated. By default, it's compiled to NOT run as root, ever. The message tells you this, that its a bad idea, and how to do it if you really want to.
Quote:
2) Is there a easy fix that i can bring the application up by letting apache run as root? I have been trying to get it working from last 2 days and no luck till now.
Are you starting Apache when you're logged in as root, or as a regular user? What version/distro of Linux are you using? Have you tried running "apachectl start"?

Last edited by TB0ne; 03-20-2013 at 01:40 PM.
 
  


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
unusual apache mod_rewrite rule entz Linux - Server 1 10-04-2009 09:48 AM
Apache server issue.... kishorerhce508 Linux - Server 6 07-07-2009 11:16 AM
Issue with Apache Server?? ajeetraina Linux - Server 1 11-15-2007 02:25 AM
Unusual keyboard issue kenneth.ramsey Debian 2 04-22-2007 08:28 AM
Apache Logs - Showing unusual domains mdavis Linux - Security 14 04-22-2004 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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