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.
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.
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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With