LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-05-2003, 01:51 PM   #1
consta
LQ Newbie
 
Registered: Jul 2003
Location: Neurope
Distribution: debian
Posts: 6

Rep: Reputation: Disabled
to run apache as root !


This may sound dangerous but i have to do this and this nite linux web-server is not public :)

So, how do i run apache as root? I have tried following ( and every other way to do this without root privileges):

i put this in src/Configuration file:
EXTRA_CFLAGS=-DBIG_SECURITY_HOLE

And rebuild apache with:
./configure --server-uid=0 / or uid=root

But still apache throws up this message:

<clip>
add -DBIG_SECURITY_HOLE to the EXTRA_CFLAGS line in your src/Configuration file
</clip>

// for all man kind

:study:
 
Old 08-05-2003, 02:20 PM   #2
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
I don't know why you'd want to do this. It's much easier and more secure (I know it's internal-only) to adjust the permissions on the files that 'need root access' so that Apache can read them.

You need to edit /etc/httpd/conf/httpd.conf and change the 'User apache' and/or 'Group apache' lines to run apache as an alternate user.

For more information, read the documentation available at http://httpd.apache.org/docs-project/
 
Old 08-05-2003, 02:25 PM   #3
consta
LQ Newbie
 
Registered: Jul 2003
Location: Neurope
Distribution: debian
Posts: 6

Original Poster
Rep: Reputation: Disabled
yep

There is one reason for this. I'm running few programs under apache which are trying to write and read from different memory addresses. This is not possible without root privileges.
 
Old 08-06-2003, 08:14 AM   #4
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
The User and Group directives in the httpd configuration file should do the trick, then. Good luck!
 
Old 08-07-2003, 03:48 AM   #5
consta
LQ Newbie
 
Registered: Jul 2003
Location: Neurope
Distribution: debian
Posts: 6

Original Poster
Rep: Reputation: Disabled
Jep

Yes it should. If set these variables in httpd.conf, user root & group & root and try to run apache without compiling modification, it will not allow do that. I managed it to work and i had to modify makefile by hand.
 
  


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
Can't run X as root! t-smurf Linux - Software 2 10-04-2005 01:49 PM
I have to ssh -l root to run root processes!? paul.nel Red Hat 3 11-15-2004 11:55 AM
Can only run apache from root? apc Linux - Software 2 07-29-2004 01:35 AM
run as root squi Linux - Newbie 5 09-19-2003 09:31 AM
LimeWire installed as root, can't run if not root sulzla Linux - Newbie 1 07-01-2003 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:51 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