httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foo, Randy" <randy....@hp.com>
Subject RE: [users@httpd] Username/Group setting
Date Thu, 30 Oct 2003 23:58:20 GMT
Leif,

Thankyou!!!  I have it running under www now. 

The following result is after reconfiguring the *real* conf file, which
you helped me find:

[root@listlnx bin]# ./httpd -V|egrep "(ROOT|SERVER_CONF)"
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Which makes it appear that the httpd root is at /usr/local/apache2

But when first tried without the filter:

ot@listlnx conf]# httpd -V
Server version: Apache/2.0.40
Server built:   Feb 25 2003 05:01:56
Server's Module Magic Number: 20020628:0
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

[root@listlnx conf]# which httpd
/usr/sbin/httpd
[root@listlnx conf]#


The conf file was in a different place than I originally thought - at
/etc/httpd The documentation for apache doesn't say anything about the
conf file being elsewhere, unless the prefix directory has been changed
with options (but I hadn't done that).  I was editing
--PREFIX/conf/httpd.conf  (where --PREFIX is the default
/usr/local/apache2)

After some reconfiguration of the /etc/httpd.conf file and a restart,
the server is happily serving up mailman cgi pages.  

Thanks again!

Randy 





-----Original Message-----
From: Leif W [mailto:warp-9.9@usa.net] 
Sent: Thursday, October 30, 2003 10:39 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Username/Group setting


Do you have multiple Apache installations or config files?  Ensure
you're editing the right config file for the right server.  Check
httpd's compiled in defaults.

<defiant> [2003-10-30@13:25:39] /var/log -> ps auxwwf | grep httpd |
grep -v grep
root      2829  0.0  1.8  8044 4848 ?        S    12:15   0:02
/usr/local/apache2/bin/httpd -k start -DSSL
www       2845  0.0  1.7  8044 4488 ?        S    12:21   0:00  \_
/usr/local/apache2/bin/httpd -k start -DSSL
www       2846  0.0  2.0  8272 5272 ?        S    12:21   0:00  \_
/usr/local/apache2/bin/httpd -k start -DSSL
www       2849  0.0  1.8  8044 4880 ?        S    12:21   0:00  \_
/usr/local/apache2/bin/httpd -k start -DSSL

<defiant> [2003-10-30@13:25:53] /var/www -> /usr/local/apache2/bin/httpd
-V
| egrep "(ROOT|SERVER_CONF)"
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
<defiant> [2003-10-30@13:26:02] /var/www ->

Again, I don't know what RedHat does to mangle Apache's default
installation httpd.conf file, but the one from apache.org has a section
like this:

<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#
# comments here deleted for brevity's sake
#
#User nobody
#Group #-1
User www
Group www
</IfModule>
</IfModule>

Save and restart the server with HTTPD_ROOT/bin/apachectl restart (or
graceful).

This is how I have successfully changed the User and Group from Apache's
default of nobody/nogroup.

Also note, my www user is a restricted user which has no home dir
(/dev/null) and no shell (/bin/false), which is even less than what user
nobody has by default on Debian (it has a /bin/sh shell).

Leif

----- Original Message ----- 
From: "Foo, Randy" <randy.foo@hp.com>
To: <users@httpd.apache.org>
Sent: Thursday, October 30, 2003 12:55 PM
Subject: RE: [users@httpd] Username/Group setting


Thankyou.  I tried it, and there are no processes running under nobody.
I tried a ps -ef|grep httpd, and it looks to be running one instance of
httpd as root, and several children as apache. I can't figure out how to
get it to switch users to www though, using the httpd.conf file and
changing the user and group to www just isn't working.  Is there
something I am missing?

Any advice appreciated

Best regards,
Randy Foo

-----Original Message-----
From: Jerome Schlumberger [mailto:jerome.schlumberger@nexantis.net]
Sent: Wednesday, October 29, 2003 5:35 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Username/Group setting



You can do ps -u user
to verify if httpd run with this user identity.
Usually the user is  nobody so:  ps -u nobody

On Thursday 30 October 2003 10:25, Foo, Randy wrote:
> Hello,
>
> How can you tell what user apache is running under?  According to the 
> documentation, it should be possible to change it to user www using 
> the httpd.conf file.  It says to run it once as root, and then it will

> change over, but I don't know how to verify this.  I have some 
> problems with apache not serving CGI pages for mailman 2.1.2 on a Red 
> Hat 9 installation with apache 2.0.47.  I've set ScriptAlias to the 
> mailman directory, and mailman was compiled to use www as a cgi-gid. 
> The username www does exist and can log in.  I get the "Object not 
> Found" error when trying to hit the cgi pages of mailman.  The error 
> logs tell me nothing, really.  Any ideas on what I'm doing wrong here,

> so that the CGI wouldn't work?
>
>
>
> Thanks,
>
> Randy Foo
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project. See <URL:http://httpd.apache.org/userslist.html> for more 
> info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message