LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cant su apache (https://www.linuxquestions.org/questions/linux-newbie-8/cant-su-apache-496675/)

MrSako 10-29-2006 02:21 PM

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?

acid_kewpie 10-29-2006 02:30 PM

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.

MrSako 10-29-2006 04:21 PM

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?

btmiller 10-29-2006 05:55 PM

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.