0

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

DarkLeafyGreen
  • 283
  • 5
  • 7
  • 23

4 Answers4

2

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

user9517
  • 115,471
  • 20
  • 215
  • 297
1

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

chocripple
  • 2,109
  • 14
  • 9
0

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.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
0
$ grep -i "^user" /etc/apache2/httpd.conf
quanta
  • 51,413
  • 19
  • 159
  • 217