Skip to content

Instantly share code, notes, and snippets.

@drola
Created March 7, 2015 17:26
Show Gist options
  • Save drola/13ea1ae4397fce7e40f7 to your computer and use it in GitHub Desktop.
Save drola/13ea1ae4397fce7e40f7 to your computer and use it in GitHub Desktop.
Identify apache user
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {if ($1) print $1}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment