LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-10-2008, 05:06 PM   #1
cool47
Member
 
Registered: Mar 2008
Location: Disney World
Distribution: CentOS
Posts: 50

Rep: Reputation: 15
"apache" user in cgi-bin scripts


hi,

In my rhel5 machine, when i execute just command "whoami" as a root in web server it showing that output is "apache". why?
eg:
#lynx www.example.com/cgi-bin/test.sh
vi test.sh
#! /bin/bash
whoami
set
env
(everything of apache)
but the user and group of test.sh is root.

so when i use the find command

#find / -type f -group apache
only file in /usr/sbin/suexec

why like this?. Actually i want the o/p as root .

thanks in advance.
 
Old 08-10-2008, 05:10 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Apache runs as a non-privileged user/group; the user/group is configurable, but should not be root for security reasons.

What reason makes you believe you need apache to run as root?
 
Old 08-10-2008, 05:19 PM   #3
cool47
Member
 
Registered: Mar 2008
Location: Disney World
Distribution: CentOS
Posts: 50

Original Poster
Rep: Reputation: 15
thanks for your comments. No reason for that. Just for curiosity how do i run as a root ?
 
Old 08-10-2008, 05:27 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
In httpd.conf:

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User www
Group www
 
  


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
cgi-bin: "enable to create directory" xpucto Linux - Server 3 05-16-2007 09:09 AM
cgi-bin: "attempt to invoke directory as script" hamish Linux - Software 0 12-09-2004 12:45 PM
What does this mean? suSE9.1 ATI "/bin/sh: line 1: scripts/modpost: No such file or" op_stager Linux - Hardware 0 09-29-2004 11:28 PM
apache 2.0 user cgi-bin directories JHuizingh Linux - Software 3 03-19-2003 03:58 PM
apache "advanced extranet server" forbids cgi! burningodzilla Linux - Networking 4 05-08-2002 10:14 AM


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