Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I determine the user Apache is run as?

Tags:

apache

How to check what is Apache user?

I need to give read write permission to it, for some directories in my web root and outside of thee web root directory, how can i do that?

Since I dont have proper idea of what Apache user is, I cannot answer my next question.

like image 862
tecman Avatar asked Mar 17 '11 17:03

tecman


People also ask

What is the default user for Apache?

By default, Apache uses www-data user in Ubuntu/Debian and apache in CentOS/Redhat/Fedora to access your website files and run system commands. However, sometimes you may need to use a different user & group for your website files. Here are the steps to change Apache user.

What is the Apache user in CentOS?

Apache, in its working process, defines what user Apache is running as in the configuration files. It means you can check those files to see the user configured. You can see the user is www-data on the Ubuntu server. Here, the user is apache on the CentOS server.


1 Answers

ps aux | egrep '(apache|httpd)' typically will show what apache is running as.

Usually you do not need to change the default user, "nobody" or "apache"

like image 114
PPPPPPPPP Avatar answered Oct 22 '22 13:10

PPPPPPPPP