Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
  • 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?

share|improve this question

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

3 Answers 3

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

share|improve this answer

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

share|improve this answer
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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.