Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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"?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.