cant su apache
im logged in as root, and i want to run my apache server as apache. so i type su apache first. then i get this...
# su apache This account is currently not available. what does that mean? and what do i do about it? |
the apache account should not permit a login. as it is only used to run a daemon, it should have no login shell, as no login chell is required to run the apache daemon.
|
so how do i start the apache daemon as the apache user? does it automatically do this even if i run it as root?
does mysql work the same way? |
Yup. If you look in the httpd.conf file there's a line that tells Apache which user to become. In fact, Apache has to start as root to listen on port 80 (only root can bind to ports < 1024). So Apache starts as root and then drops privileges to the user specified in httpd.conf.
If you really need to become the Apache user for some reason try: su -s /bin/bash apache This will override /etc/passwd and start a bash shell as Apache (I believe this is only doable if you're root). |
All times are GMT -5. The time now is 10:47 PM. |