Apache2 échec réinstall : bad group name www-data

Salut,

J’ai eu quelques soucis avec mon serveur suite à la suppression de deux utilisateurs.

Au redémarrage j’avais le message suivant :

root@Debian-pc-1:/home/pc-1-loreleil# /etc/init.d/apache2 start Starting web server: apache2apache2: bad group name www-data Action 'start' failed. The Apache error log may have more information. failed!
Cela fait trois jours que je glane des infos sur le web … j’en suis arrivé à la prendre la décision d’une ré-install d’apache … j’ai les boules … toutes mes config à refaire sans parlé de la mise en sécurité … :mrgreen:

J’ai donc tout viré y compris mysql, phpmyadmin … purge complète … :12

apt-get --purge remove apache2* dpkg -l | grep apache dpkg --get-selections | grep apache
Un reboot au cas où … là je me croyais sorti d’affaire … ré-install !

root@Debian-pc-1:/home/pc-1-loreleil# apt-get install --reinstall apache2 apache2-doc Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Les paquets supplémentaires suivants seront installés : apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common Paquets suggérés : apache2-suexec apache2-suexec-custom Les NOUVEAUX paquets suivants seront installés : apache2 apache2-doc apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common 0 mis à jour, 6 nouvellement installés, 0 à enlever et 0 non mis à jour. Il est nécessaire de prendre 2 304 ko/4 212 ko dans les archives. Après cette opération, 19,1 Mo d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer [O/n] ? .... Enabling site default. ...... Enabling module reqtimeout. Paramétrage de apache2-mpm-worker (2.2.16-6+squeeze1) ... Starting web server: apache2apache2: bad group name www-data Action 'start' failed. The Apache error log may have more information. failed! invoke-rc.d: initscript apache2, action "start" failed. Paramétrage de apache2 (2.2.16-6+squeeze1) ... Paramétrage de apache2-doc (2.2.16-6+squeeze1) ... apache2: bad group name www-data Action 'configtest' failed. The Apache error log may have more information. failed! invoke-rc.d: initscript apache2, action "reload" failed. root@Debian-pc-1:/home/pc-1-loreleil#
et là c’est la merde … :118

[code]# /etc/init.d/apache2 stop

/etc/init.d/apache2 start

/etc/init.d/apache2 restart

apache2: bad group name www-data
Action ‘configtest’ failed.
The Apache error log may have more information.
failed!
root@Debian-pc-1:/home/pc-1-loreleil#
[/code]

[quote]apache2: bad groupe www-data nom
«Configtest 'action a échoué.
Le journal des erreurs Apache peut avoir plus d’informations.
a échoué! [/quote]

[code]pc-1-loreleil@Debian-pc-1:~$ grep http /etc/services

Updated from http://www.iana.org/assignments/port-numbers and other

sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services .

www 80/tcp http # WorldWideWeb HTTP
https 443/tcp # http protocol over TLS/SSL
https 443/udp
http-alt 8080/tcp webcache # WWW caching service
http-alt 8080/udp # WWW caching service
pc-1-loreleil@Debian-pc-1:~$
[/code]

root@Debian-pc-1:/home/pc-1-loreleil# netstat -natupw | grep 80 udp6 0 0 fe80::216:17ff:feba:123 :::* 1927/ntpd root@Debian-pc-1:/home/pc-1-loreleil#

[code]pc-1-loreleil@Debian-pc-1:~$ cat /etc/network/interfaces

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp
pc-1-loreleil@Debian-pc-1:~$
[/code]

ls -al /var drwxr-xr-x 2 root root 4096 1 avril 17:45 www

pc-1-loreleil@Debian-pc-1:~$ grep -RE "USER|GROUP" /etc/apache2 /etc/apache2/envvars:export APACHE_RUN_USER=www-data /etc/apache2/envvars:export APACHE_RUN_GROUP=www-data /etc/apache2/apache2.conf:User ${APACHE_RUN_USER} /etc/apache2/apache2.conf:Group ${APACHE_RUN_GROUP} pc-1-loreleil@Debian-pc-1:~$

pc-1-loreleil@Debian-pc-1:~$ grep -R DocumentRoot /etc/apache2/* /etc/apache2/sites-available/default-ssl: DocumentRoot /var/www /etc/apache2/sites-available/default: DocumentRoot /var/www /etc/apache2/sites-enabled/000-default: DocumentRoot /var/www pc-1-loreleil@Debian-pc-1:~$

pc-1-loreleil@Debian-pc-1:~$ grep ww-data /etc/passwd www-data:x:33:1002:www-data:/var/www:/bin/sh pc-1-loreleil@Debian-pc-1:~$

pc-1-loreleil@Debian-pc-1:~$ ps aux | grep apache 1000 4117 0.4 3.0 230924 31048 ? S 18:28 0:03 /usr/bin/kwrite /home/pc-1-lorelei ... 1000 4146 0.0 0.0 10092 900 pts/2 S+ 18:39 0:00 grep apache pc-1-loreleil@Debian-pc-1:~$

[code]pc-1-loreleil@Debian-pc-1:~$ cat /etc/hosts
127.0.0.1 localhost
192.168.1.12 Debian-pc-1.home Debian-pc-1

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
pc-1-loreleil@Debian-pc-1:~$
[/code]
je ne sais pas quoi faire avec ça … :017

[quote]apache2: bad group name www-data
Action ‘configtest’ failed.
The Apache error log may have more information.
failed!
[/quote]

[quote][/quote]
:116 … ça tombe vraiment très mal … :013 je lance mon site pro courant semaine prochaine … j’ai les boules …

Toutes aides … conseils seront les bienvenues … :023

Tu as regardé les logs ?

[quote]grep ww-data /etc/passwd
www-data:x:33:1002:www-data:/var/www:/bin/sh[/quote]
Cela ne semble pas correct.

J’ai cela de mon côté :

[quote]grep www-data /etc/passwd
www-data:x:33:33:www-data:/var/www:/bin/sh
grep www-data /etc/group
www-data:x:33:[/quote]

Bonjour,

Ton user www-data est dans le groupe 1002 qui est un groupe user et non system.

Remplace dans ton /etc/passwd le 1002 par 33 au niveau de www-data.

Est-ce que le groupe www-data existe bien dans /etc/group ?

Salut,

Vous avez mis le doigt dessus … :023

Il y a trois où quatre jours j’avais supprimé deux utilisateurs lors d’une install de “vsftpd” qui à aboutit à un échec, d’ou la suppression des deux “users” créer faite à l’arrache graphiquement avec “kuser”. C’est là que j’ai merdé …

Et je n’arrivai pas à rétablir … correctement :017

:~$ grep ww-data /etc/passwd www-data:x:33:1002:www-data:/var/www:/bin/sh

:~$ grep www-data /etc/group apache:*:33:www-data

C’est donc là ou j’ai merdé “graphiquement” … Voilà ce que j’ai actuellement !

nano /etc/passwd www-data:x:33:1002:www-data:/var/www:/bin/sh

nano /etc/group apache:*:33:www-data
Là si comprend bien j’ai un “group” “apache” mais pas de de “group” “www-data” … ?
Donc pour faire propre … supprimé le “group” “apache” … :question:

delgroup apache

Puis … créer

groupadd www-data
qui rétablirai “id” à 33

En fait j’avais créer un “user” “www-data” et un “group” “apache” … non ?

est ce bien ça … c’est la bonne procédure à suivre … ?

Et … le plus couillon c’est qu’il n’y avait pas là nécessité à tous viré … :118 …comme je l’ai fait … :mrgreen:

Salut,

C’est rétablit … :023

:~$ grep www-data /etc/group apache:*:33:www-data

:~$ grep www-data /etc/passwd www-data:x:33:33:www-data:/var/www:/bin/sh

# /etc/init.d/apache2 restart Restarting web server: apache2.

:~$ ps aux | grep apache root 13015 0.0 0.2 71320 2864 ? Ss 09:40 0:00 /usr/sbin/apache2 -k start www-data 13017 0.0 0.1 71052 1980 ? S 09:40 0:00 /usr/sbin/apache2 -k start www-data 13021 0.0 0.2 294748 2624 ? Sl 09:40 0:00 /usr/sbin/apache2 -k start www-data 13022 0.0 0.2 294748 2628 ? Sl 09:40 0:00 /usr/sbin/apache2 -k start 1000 13110 0.0 0.0 10092 900 pts/3 S+ 09:42 0:00 grep apache

[code]:~$ grep http /etc/services

Updated from http://www.iana.org/assignments/port-numbers and other

sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services .

www 80/tcp http # WorldWideWeb HTTP
https 443/tcp # http protocol over TLS/SSL
https 443/udp
http-alt 8080/tcp webcache # WWW caching service
http-alt 8080/udp # WWW caching service
[/code]

Je vous dois une fière chandelle … :041 merci à vous deux … :023

Me reste plus qu’a tout re-configurer et sécuriser … j’ai trois jours devant moi, ça va le faire !

Je vous en serre cinq … merci … :wink: