LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-07-2004, 12:42 PM   #1
asktoby
Member
 
Registered: Jul 2003
Location: Cardiff, England ;)
Distribution: Mandrake 9.1
Posts: 94

Rep: Reputation: 15
Running apache as root at startup


Hi

I've been told that I should run apache as root to be secure. Although it doesn't sound safe, aparrently all apache child processes will be run as user, so it is safe.

I'd like apache to run automatically upon boot. Usually I'd add a line to .bash_profile, but in order to run it as root I'd have to type the following into .bash_profile

su -
mypassword
/usr/local/apache2/bin/apachectrl start

It can't be secure to store my root password in .bash_profile, surely. How else should I do this?

Thanks,
 
Old 01-07-2004, 02:48 PM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You need to start Apache as root if you want it to bind to port 80. The child processes should run as another non-privelaged user which is defined in your conf file.
 
Old 01-07-2004, 05:33 PM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
You need to have apache run from your init_scripts. Putting it in your profile would mean you would have to log in to start it which isn't at all what people usually want to do with apache. If you are running Mandrake there is probably some automagical way of adding a service to your init scripts that somebody else can help you out with, or that is well documented.
 
  


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
Running Programs at Startup burningsun1981 Linux - Newbie 2 07-03-2005 07:56 PM
Failed to start apache : Apache does not appear to be running : number11 Slackware 9 02-11-2005 09:51 AM
Apache - running as root The_JinJ Linux - Software 2 11-26-2004 01:43 AM
installed as root, running as non-root? daniela Linux - Newbie 4 09-09-2003 04:41 PM
Running a service at startup correro Linux - General 14 02-18-2003 07:00 PM

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

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