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?

1 Answer 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?.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .