1

There is a question about the group, but I couldn't find any question/answer for getting the Apache user.

Therefore how to determine Apache user from the command-line?

kenorb
  • 20,250
  • 14
  • 140
  • 164

1 Answers1

1

You may try to use the following command-line method to find out your Apache user name:

WWW_USER=`ps axo user,group,comm | egrep '(apache|httpd)' | grep -v ^root | cut -d\  -f 1 | uniq`
echo Apache user is: $WWW_USER

To get the Apache group, simple change the cut's field number from 1 to 2, see: How to check which Apache group I can use for the web server to write?.

kenorb
  • 20,250
  • 14
  • 140
  • 164