|
List Info
Thread: How in the name of LINUX do u set apache2.2 to run as user www-data
|
|
| How in the name of LINUX do u set
apache2.2 to run as user www-data |
  United States |
2007-07-25 01:25:09 |
I have googled for information in configuring apache to run
as www-data
user a couple of days and all i find are tid bits and they
are very general.
I tried changing permissions for the directories, the
www-data user and
group were added by the installation of xubuntu
I have search high and low and cant find a HOW-TO anywhere.
Please help
Thank you,
Demetri
running:
Xubuntu 7.04
Apache 2.2
PHP 5.2.1
mySql 5.0.38
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |

|
2007-07-25 05:14:50 |
Hi Demetri,
Change the User parameter in httpd.conf. Here's what I have
in mine:
# 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.
# . On SCO (ODT 3) use "User nouser" and
"Group nogroup".
# . On HPUX you may not be able to use shared memory as
nobody, and the
# suggested workaround is to create a user www and use
that user.
# NOTE that some kernels refuse to setgid(Group) or
semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User apache
Group apache
Hope that helps.
cheers,
dim
On 7/25/07, Demetri T. <demetri007 optonline.net> wrote:
> I have googled for information in configuring apache to
run as www-data
> user a couple of days and all i find are tid bits and
they are very general.
> I tried changing permissions for the directories, the
www-data user and
> group were added by the installation of xubuntu
>
> I have search high and low and cant find a HOW-TO
anywhere. Please help
>
> Thank you,
> Demetri
>
> running:
> Xubuntu 7.04
> Apache 2.2
> PHP 5.2.1
> mySql 5.0.38
>
>
>
>
------------------------------------------------------------
---------
> The official User-To-User support forum of the Apache
HTTP Server Project.
> See <URL:http://htt
pd.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://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |
  United States |
2007-07-25 09:56:07 |
Dmitri Colebatch wrote:
> Hi Demetri,
>
> Change the User parameter in httpd.conf. Here's what I
have in mine:
>
> # 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.
> # . On SCO (ODT 3) use "User nouser" and
"Group nogroup".
> # . On HPUX you may not be able to use shared memory
as nobody, and the
> # suggested workaround is to create a user www and
use that user.
> # NOTE that some kernels refuse to setgid(Group) or
semctl(IPC_SET)
> # when the value of (unsigned)Group is above 60000;
> # don't use Group #-1 on these systems!
> #
> User apache
> Group apache
>
> Hope that helps.
>
> cheers,
> dim
>
>
> On 7/25/07, Demetri T. <demetri007 optonline.net> wrote:
>> I have googled for information in configuring
apache to run as www-data
>> user a couple of days and all i find are tid bits
and they are very
>> general.
>> I tried changing permissions for the directories,
the www-data user and
>> group were added by the installation of xubuntu
>>
>> I have search high and low and cant find a HOW-TO
anywhere. Please help
>>
>> Thank you,
>> Demetri
>>
>> running:
>> Xubuntu 7.04
>> Apache 2.2
>> PHP 5.2.1
>> mySql 5.0.38
>>
>>
>>
>>
------------------------------------------------------------
---------
>> The official User-To-User support forum of the
Apache HTTP Server
>> Project.
>> See <URL:http://htt
pd.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://htt
pd.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
>
>
Thanks for the reply Dim
thats already set by default when i installed apache(which
is
www-data). I think i am having an issue either with
file/directory
permissions and/or on how Apache is starting up; it just
stays running
as root instead switching over to www-data (the user/group
set when
installed).
I am having a hard time finding the requirements for apache
to run as
another user, would you or anyone know. i have checked the
apache docs
to no avail, and still searching the net.
Thanks
Demetri
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |

|
2007-07-25 10:03:35 |
On 7/25/07, Demetri T. <demetri007 optonline.net> wrote:
> thats already set by default when i installed
apache(which is
> www-data). I think i am having an issue either with
file/directory
> permissions and/or on how Apache is starting up; it
just stays running
> as root instead switching over to www-data (the
user/group set when
> installed).
>
> I am having a hard time finding the requirements for
apache to run as
> another user, would you or anyone know. i have checked
the apache docs
> to no avail, and still searching the net.
You are probably misinterpreting something, since apache
will not run
as root without compile-time changes.
There is supposed to be one (control) process running as
root that
launches child processes running under the specified
User/Group that
actually handle requests.
Joshua.
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |
  United States |
2007-07-25 10:12:28 |
Demetri T. wrote:
>thats already set by default when i installed
apache(which is
>www-data). I think i am having an issue either with
file/directory
>permissions and/or on how Apache is starting up; it just
stays
>running as root instead switching over to www-data (the
user/group
>set when installed).
>
>I am having a hard time finding the requirements for
apache to run
>as another user, would you or anyone know. i have
checked the apache
>docs to no avail, and still searching the net.
---------------- End original message.
---------------------
I am sure somebody will correct me if I am wrong but IIRC,
invoking
httpd directly results in it continuing to run as the user
that invoked it.
As stated in the manpage for httpd:
httpd is the Apache HyperText Transfer Protocol
(HTTP) server
program. It is designed to be run as a standalone
daemon process. When used like this it will create a
pool of
child processes or threads to handle requests.
In general, httpd should not be invoked directly,
but rather
should be invoked via apachectl on Unix-based sys-
tems or as a service on Windows NT, 2000 and XP and
as a
console application on Windows 9x and ME.
How are you starting Apache?
Are you using the startup script apachectl or are you
starting it directly?
Most *nix type OS distributions also have a startup script
that is
run at system boot to invoke httpd which generally does some
house
keeping stuff and then invokes apachectl. You may have to
use a
utility like checkcfg on Red Hat systems or your system's
equivalent
to enable the startup on boot.
Dragon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
Venimus, Saltavimus, Bibimus (et naribus canium capti
sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |

|
2007-07-25 10:35:46 |
On 7/25/07, Dragon <dragon crimson-dragon.com>
wrote:
>
> I am sure somebody will correct me if I am wrong but
IIRC, invoking
> httpd directly results in it continuing to run as the
user that invoked it.
Consider yourself corrected
httpd always switches users for child processes when started
as root.
Joshua.
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |
  United States |
2007-07-25 11:04:34 |
Joshua Slive wrote:
>On 7/25/07, Dragon <dragon crimson-dragon.com>
wrote:
>
>>
>>I am sure somebody will correct me if I am wrong but
IIRC, invoking
>>httpd directly results in it continuing to run as
the user that invoked it.
>
>Consider yourself corrected
>
>httpd always switches users for child processes when
started as root.
---------------- End original message.
---------------------
Hey, we learn something new every day.
Thanks for the clarification.
Dragon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
Venimus, Saltavimus, Bibimus (et naribus canium capti
sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |
  United States |
2007-07-25 12:28:44 |
Joshua Slive wrote:
> On 7/25/07, Demetri T. <demetri007 optonline.net> wrote:
>
>> thats already set by default when i installed
apache(which is
>> www-data). I think i am having an issue either
with file/directory
>> permissions and/or on how Apache is starting up; it
just stays running
>> as root instead switching over to www-data (the
user/group set when
>> installed).
>>
>> I am having a hard time finding the requirements
for apache to run as
>> another user, would you or anyone know. i have
checked the apache docs
>> to no avail, and still searching the net.
>
> You are probably misinterpreting something, since
apache will not run
> as root without compile-time changes.
>
> There is supposed to be one (control) process running
as root that
> launches child processes running under the specified
User/Group that
> actually handle requests.
>
> Joshua.
>
>
------------------------------------------------------------
---------
> The official User-To-User support forum of the Apache
HTTP Server
> Project.
> See <URL:http://htt
pd.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
>
>
Ok so looking at my proc list i see 6 apache process(only
one with PID
1) and all of them running as root. Does that mean i need
to compile
apache with specific options?
I looked over my apache setup this is what i have:
apache is executed using the apache2 script in /etc/init.d
the apache2 script then calls on apachectl in the /usr/bin
directory
apachectl then executes apache2 which is in the same
directory
I also went over my apache2.conf file and the user/group
directives are
listed as:
user www-data
group www-data
I am still trying to find the permissions apache needs for
the server
root, document root, and log directory. any idea on this?
Also if you know any good books that you can recommend i am
all ears?
Thanks for your help and time
Demetri
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |
  United States |
2007-07-26 01:37:56 |
Demetri T. wrote:
> I have googled for information in configuring apache to
run as
> www-data user a couple of days and all i find are tid
bits and they
> are very general.
> I tried changing permissions for the directories, the
www-data user
> and group were added by the installation of xubuntu
>
> I have search high and low and cant find a HOW-TO
anywhere. Please help
>
> Thank you,
> Demetri
>
> running:
> Xubuntu 7.04
> Apache 2.2
> PHP 5.2.1
> mySql 5.0.38
>
>
>
>
------------------------------------------------------------
---------
> The official User-To-User support forum of the Apache
HTTP Server
> Project.
> See <URL:http://htt
pd.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
>
>
OK does anyone here know why when i run ps aux in a terminal
i can see 4
www-data and 1 as root for apache, but when i use xfce
taskmanager i see
the root user running all apache process?
all this time i was thinking there was some config error.
Thanks
Demetri
running:
Xubuntu 7.04
Apache 2.2
PHP 5.2.1
mySql 5.0.38
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: How in the name of LINUX do u set
apache2.2 to run as user www-data |
  Slovakia |
2007-08-30 10:20:41 |
On 26.07.07 02:37, Demetri T. wrote:
> OK does anyone here know why when i run ps aux in a
terminal i can see 4
> www-data and 1 as root for apache, but when i use xfce
taskmanager i see
> the root user running all apache process?
> all this time i was thinking there was some config
error.
probably XFCE taskmanager config error
--
Matus UHLAR - fantomas, uhlar fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this
address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek
reklamnu postu.
Micro$oft random number generator: 0, 0, 0, 4.33e+67, 0, 0,
0...
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
|
|