Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Finding out what user Apache is running as?

I use openSuse and I try to find out the name of the apache user. So I enter

vim /etc/passwd

in the terminal. Or

ps -a

Both don't have apache listed. I have mysql and other stuff but apache isn't mentioned. Any ideas?

ps aux | grep httpd

Output:

enter image description here

share|improve this question
1  
Your apache is running as user wwwrun –  Iain Aug 5 '11 at 7:33
    
thanks and whats the group for that user? –  ArtWorkAD Aug 5 '11 at 7:36
1  
Check with groups wwwrun. –  quanta Aug 5 '11 at 7:40
add comment

marked as duplicate by womble, MikeyB, Scott Pack, MDMarra, voretaq7 Nov 21 '11 at 14:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers

up vote 2 down vote accepted

Try

ps aux | grep httpd

or

ps aux | grep apache

The first column of the output is the user that is running the process.

Sample output from a CentOS system

apache    4173  0.0  0.6 239100  6720 ?        S    Aug04   0:00 /usr/sbin/httpd

and an Ubuntu system

www-data  3124  0.0  0.2   6452  2180 ?        S    Aug04   0:00 /usr/sbin/apache2 -k start

On CentOS apache is running as user apache and on Ubuntu it's running as www-data

share|improve this answer
    
the first column is named with root, so is root the apache user? –  ArtWorkAD Aug 5 '11 at 7:17
    
I edited my question. habe a look at the output –  ArtWorkAD Aug 5 '11 at 7:27
    
no output pal. You messed up the link! –  Anarko_Bizounours Aug 5 '11 at 7:41
add comment

just see on httpd.conf (usually on /etc/httpd/conf/) grep User httpd.conf

share|improve this answer
add comment

You sure have creative ways for finding stuff. :-)

I have not installed Apache in openSUSE, but my blind guess is that the user is not actually named apache but httpd instead. Or then you don't have Apache installed. Please, when asking, try to be more verbose and descriptive.

share|improve this answer
add comment
$ grep -i "^user" /etc/apache2/httpd.conf
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.