Php – apache2: bad user name www-data

apache-2.2PHPweb-server

  • Starting web server apache2 apache2: bad user name www-data

I just tried restarting my webserver because of an update I did to my php.ini and originally I was getting something about the PID file being overwritten.

Now I just get this: * Starting web server apache2 apache2: bad user name www-data

this has NEVER happened before, and I haven't changed and permissions or apache2 configuration files.

What gives?

Best Answer

1. You may deleted user www-data. Check id www-data, output should be like this:

# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),2522(psaserv),2523(psacln)

If no such user exists, add it: adduser www-data

2. You may overwritten your Apache config with config from other computer, where exists user www-data. If so, restore old config, or check config and replace user with existent one (for example, www).