LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-25-2005, 01:13 AM   #1
nistelrooy
Member
 
Registered: Oct 2003
Location: Singapore
Distribution: debian
Posts: 162

Rep: Reputation: 30
Apache still falls into Root


Hi LinuxQuestion Helpers

Thanks for your time to help me vet this problem.


I'm trying very hard to assign www-data for apache. No matter how many times i restart and modify the httpd.conf (apache.conf), it doesn't seem to be able to go under www-data completely.


Code:
root     22831  0.0  1.5  16192  5920 ?        Ss   Jul23   0:01 /usr/sbin/apache2 -k start -DSSL
www-data 22834  0.0  2.6  20072 10408 ?        S    Jul23   0:13 /usr/sbin/apache2 -k start -DSSL
www-data 22836  0.0  2.8  20320 10880 ?        S    Jul23   0:30 /usr/sbin/apache2 -k start -DSSL
www-data 22839  0.0  2.7  20232 10692 ?        S    Jul23   0:27 /usr/sbin/apache2 -k start -DSSL
www-data 22840  0.0  2.6  20080 10384 ?        S    Jul23   0:23 /usr/sbin/apache2 -k start -DSSL
www-data 30406  0.0  2.8  20320 10876 ?        S    Jul23   0:19 /usr/sbin/apache2 -k start -DSSL

Thanks for your help!
 
Old 07-25-2005, 08:57 PM   #2
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
There is no problem here, your apache is setup correctly. The apache process must start as root so that it can bind to port 80, since you need root access to bind to one of the 'priveleged ports' below 1024. Apache then drops privileges it does this by forking off one or more child processes of itself which run under the apache (or www-data in your case) user. These child processes are the ones that handle the requests from web clients and the root process is effectively a 'stub' process in that its not doing anything.

The fact that these unpriveleged processes are descendents (ie. child, grand-child, great-grand-child etc.) processes of a root process doesn't lessen the security in any way. *ALL* processes on a Linux system are descendents of the 'init' process which runs as root. So the fact that your apache processes are children of a root process would no more enable them to assume root priveleges, even if compromised by a hacker, than I could use the fact that the firefox instance I'm using to write this is a child of the init process to assume root priveleges.

Last edited by tkedwards; 07-26-2005 at 08:11 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Thunderbird button falls asleep!? Malacandra Linux - Software 0 05-02-2005 10:34 PM
ADSL connection falls every 24 hours exactly jmcollin92 Linux - Networking 3 02-29-2004 08:16 PM
X windows falls apart. untwisted Linux - General 3 02-10-2004 08:37 PM
modem..falls asleep..? b0uncer Linux - Hardware 2 08-13-2003 01:16 PM
my mandrake falls apart. Brain Drop Linux - Distributions 4 05-02-2003 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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