Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Apache running as root?
- Date: Tue, 28 May 2002 21:25:59 +0900
- From: Bruno Raoult <br@example.com>
- Subject: Re: [tlug] Apache running as root?
- References: <F36z1R4R7iM823Rm5Jt0001036b@example.com> <20020528185803.6dc361d6.bkesuma@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc3) Gecko/20020523
I don't think log files is the reason, as: 1) The log files belong to apache server user (not root), usually (at least they should) 2) If a file is opened by a parent process before a fork, the child will get the same file descriptor, and could write, even after changing its uid/gid: there is no permission check on write() system call, only on open(). The main reason could be that one process only can listen to a socket port (port 80). You can easily check, for apache, that even you have many httpd running, only one is listening to the server port. This process should be able to: - Know all its child processes (to kill, restart, increase/decrease the number, etc...) - Reread configuration files, create new files in directories where only root could create files (even if the owner id changed later) - Open new sockets on low-numbered port (eg. after a kill -USR1), if you changed the configuration file - etc... Bruno. -- Computers are like air-conditions. They don't properly work, if you open Windows. br. Batara Kesuma wrote: >Hi Jc :) > >On Tue, 28 May 2002 17:24:36 +0900 >"Jean-Christian Imbeault" <jean_christian@example.com> wrote: > > > >>Is having the httpd running as root normal? Is it safe? I read that >>apache needed to start running as root in order to bind to port 80 but >>that after that it would switch to user nobody . . . However I still >>have the oneprocess running as root. >> >> > >Yes, it is normal. >Because the child still needs its root, for example to write the apache >log file, etc. > >--bk > > > >
- References:
- [tlug] Apache running as root?
- From: Jean-Christian Imbeault
- Re: [tlug] Apache running as root?
- From: Batara Kesuma
Home | Main Index | Thread Index
- Prev by Date: [tlug] Sendmail's log?
- Next by Date: Re: [tlug] Sendmail's log?
- Previous by thread: Re: [tlug] Apache running as root?
- Next by thread: Re: [tlug] Apache running as root?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links