httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] What is the "correct way" for starting apache2 as a service in UNIX (Ubuntu)
Date Mon, 16 Jan 2012 08:12:54 GMT
It runs under the user and group that you have set in the User and Group
directives in your apache config file. It always starts as root and then
drops the privileges to that user no matter how you start it. Obviously
your User and Group are set to "daemon" in your config.

Igor
On Jan 16, 2012 6:59 PM, "Roel Wagenaar" <roel@wagenaar.nu> wrote:

> "Ravindranath  M" <ravindranath.m@comviva.com> wrote:
>
> >     Dear Apache team and other friends,
> >
> >     According to official Apache documentation, the correct way to start
> httpd
> is to use apachectl.  When I start this way it works.  Since I am using
> Ubuntu,
> I run it with "sudo"  prefix.  As a result it starts with root user's
> privileges.
> >
> >     But for another software module (Reviewboard), which is supposed to
> use
> apache web service, this is causing problems with respect to some file
> permissions.  When posted to their forum, they advised me to use the
> following
> command to start apache.
> >
> >     sudo service apache2 start|stop|restart
> >
> >     But the above command gives me errors, as below:
> >
> >     -----begin-quote-------
> >     rvnath@rvnath:~$ sudo service apache2 restart
> >     /usr/sbin/apache2: symbol lookup error: /usr/sbin/apache2: undefined
> symbol: apr_os_uuid_get
> >     Action 'configtest' failed.
> >     The Apache error log may have more information.
> >        ...fail!
> >     -----end-quote-------
> >
> >     Searching through various forums and groups didn't help me much
> either.
> >
> >     My question is:
> >
> >     1.       What is the right way to start apache as a daemon service
> in UNIX
> (Ubuntu)?
> >
> >     2.       Finally, when httpd is run, does it run as "www-data" user,
> or
> some other user.  When I did a process grep (ps -ef | grep httpd), it
> shows me
> that it runs with a user name called "daemon" instead of www-data).  So,
> is it
> correct to say that apache runs as a "daemon" user and NOT www-data as
> claimed
> by Reviewboard forums?
> >
>
>
> Ubuntu is based on Debian, the proper way to start/stop the daemon is by
> using
> the script:
>
>  /etc/init.d/apache2
>
> {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}
>
> The script will take care of the proper user/group for the daemon to start
> with.
>
>
> --
> Roel Wagenaar,
> Linux-User #469851 with the Linux Counter; http://linuxcounter.net/
>
> Men are proof that women can take a joke.
>
> ---------------------------------------------------------------------
> 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