0
  • 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?

migrated from stackoverflow.com Apr 8 '10 at 9:35

This question came from our site for professional and enthusiast programmers.

  • What Linux are you on? Does it have an auto-update function? I see quite a lot of forum posts on the net who lost their www-data user due to an automatic update of the OS. – Pekka 웃 Apr 8 '10 at 9:23
2

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).

0

close all apache connection from the Task Manager first may b this will work and then restart the services

  • 3
    From the scarce data there is, this question doesn't look Windows-related (www-data is the default Apache user on UN*X-like systems). Also, it's "maybe". – Piskvor Apr 8 '10 at 9:28
0

Look at your /etc/passwd file and retrieve what the name of the apache user is on your system.

Then adjust your config accordingly

If no user in /etc/passwd is available then you should recreate it, as somethings was gone wrong in the update process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy