Monday, May 14, 2018

opensuse - How to get the name of the apache user











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


Answer



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


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...