LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-11-2006, 02:16 AM   #1
sharad
Member
 
Registered: Dec 2005
Posts: 48

Rep: Reputation: 15
Running Apache as root user on an embedded distribution


Hi all,

I have compiled Apache-1.3.33 and mod_ssl-2.8.22 and I am running it on my own embedded distribution. Initially I configured it with User "#0" and Group "#0" for root, but it didn't work. Then I configured it for another user with User "#500" and Group "#500" in httpd.conf file and the listening ports were 8080 & 8443. With this configuration it works.
But some webpages are not accessible as I have to run apache as root for that purpose.

Please tell me the way to run apache as root. because any other way is not of use for me.

Thank you,
Sharad
 
Old 09-11-2006, 03:01 AM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Running apache as root is a Bad Idea.

Here's the error that pops up when I attempt to do so:
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 EXTRA_CFLAGS line in your
        src/Configuration file and 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.
If you are having permissions problems, running the affected program as root is the wrong way of solving them. Change the permissions of the files/directories as necessary, or add the user that apache runs as to a group with rights to those files/directories (NOT the root group). If apache runs as the nobody user (it does on my system), you'll probably want to create a special apache group and user, and then change the ownership of those files as necessary.

Last edited by zhangmaike; 09-11-2006 at 03:02 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running samba as a user other than root Questor21 Linux - Software 6 04-09-2006 12:03 PM
which linux distribution for embedded project jvoyce Slackware 4 09-29-2005 04:14 PM
Running Nmapfe as non-root user XaViaR Linux - General 3 06-10-2005 05:04 AM
Apache - running as root The_JinJ Linux - Software 2 11-26-2004 01:43 AM
Help me get KDE running as a non root user vdogvictor Slackware 8 06-27-2004 08:27 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration