1

My server seems to run apache2 as root despite set to www-data in /etc/apache2/envvars.

How can this happen ?

  • /etc/apache2/envvars

    export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data

  • Here is how I checked it

How do I figure out what user & group Apache is running as?

ps axo user,group,comm | grep apache
root     root     apache2
root     root     apache2
root     root     apache2
root     root     apache2
root     root     apache2
root     root     apache2
root     root     apache2
Community
  • 1
  • 1
JBo
  • 43
  • 1
  • 6

1 Answers1

0

I think that APACHE_RUN_USER is supposed to be the user that apache2 uses to read, write, or execute the files in your website. Not the user that runs the apache2 server. You wouldn't want your server running webpages as root, because files you may want to keep the user from accessing will become visible. I may be wrong though. Try running service apache2 restart, and checking again.

taricketts
  • 65
  • 5