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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThere 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?
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?.