samedi 17 juillet 2010

La blague du matin !


Ce matin, la bonne blague, dans mes mails `root' :

/etc/cron.daily/man-db:
/etc/cron.daily/man-db: 15: dpkg: Permission denied

Un petit tour sur le serveur et quoi ?

root@wazof:~# aptitude safe-upgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Reading extended state information
Initializing package states... Fait
The following packages will be upgraded:
libusb-0.1-4
The following partially installed packages will be configured:
dpkg
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 20,5kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n/?] Y
Writing extended state information... Fait
Get:1 http://ca.archive.ubuntu.com/ubuntu/ lucid-updates/main libusb-0.1-4 2:0.1.12-14ubuntu0.2 [20,5kB]
Fetched 20,5kB in 0s (40,2kB/s)
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)
A package failed to install. Trying to recover:
sh: dpkg: Permission denied
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Reading extended state information
Initializing package states... Fait

root@wazof:~#

WTF ??? comment ça dpkg marche pus ???

Comment ça `could not exec dpkg' ?

Évidemment :

root@wazof:~# dpkg-reconfigure dpkg
Can't exec "dpkg": Permission denied at /usr/sbin/dpkg-reconfigure line 78.
Use of uninitialized value $_ in pattern match (m//) at /usr/sbin/dpkg-reconfigure line 79.
Use of uninitialized value $_ in pattern match (m//) at /usr/sbin/dpkg-reconfigure line 80.
/usr/sbin/dpkg-reconfigure: dpkg n'est pas installé
root@wazof:~# apt-get -f install
bash: /usr/bin/apt-get: Permission denied
root@wazof:~# dpkg --configure -a
bash: /usr/bin/dpkg: Permission denied
root@wazof:~# dpkg -C
bash: /usr/bin/dpkg: Permission denied

Mmmm..... `permission denied', à moi, root ?!??

root@wazof:~# ll /usr/bin/dpk*
---------- 1 root root 379700 2010-06-28 12:27 /usr/bin/dpkg
-rwxr-xr-x 1 root root 230412 2010-06-28 12:27 /usr/bin/dpkg-deb
-rwxr-xr-x 1 root root 12010 2010-06-28 12:27 /usr/bin/dpkg-divert
-rwxr-xr-x 1 root root 96172 2010-06-28 12:27 /usr/bin/dpkg-query
-rwxr-xr-x 1 root root 42640 2010-06-28 12:27 /usr/bin/dpkg-split
-rwxr-xr-x 1 root root 91936 2010-06-28 12:27 /usr/bin/dpkg-statoverride
-rwxr-xr-x 1 root root 79600 2010-06-28 12:27 /usr/bin/dpkg-trigger


Ah...

root@wazof:~# chmod 0755 /usr/bin/dpkg
root@wazof:~# ll /usr/bin/dpk*
-rwxr-xr-x 1 root root 379700 2010-06-28 12:27 /usr/bin/dpkg
-rwxr-xr-x 1 root root 230412 2010-06-28 12:27 /usr/bin/dpkg-deb
-rwxr-xr-x 1 root root 12010 2010-06-28 12:27 /usr/bin/dpkg-divert
-rwxr-xr-x 1 root root 96172 2010-06-28 12:27 /usr/bin/dpkg-query
-rwxr-xr-x 1 root root 42640 2010-06-28 12:27 /usr/bin/dpkg-split
-rwxr-xr-x 1 root root 91936 2010-06-28 12:27 /usr/bin/dpkg-statoverride
-rwxr-xr-x 1 root root 79600 2010-06-28 12:27 /usr/bin/dpkg-trigger
Et donc voila :

root@wazof:~# aptitude safe-upgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Reading extended state information
Initializing package states... Fait
The following packages will be upgraded:
libusb-0.1-4
The following partially installed packages will be configured:
dpkg
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/20,5kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information... Fait
Paramétrage de dpkg (1.15.5.6ubuntu4.1) ...

(Lecture de la base de données... 38212 fichiers et répertoires déjà installés.)
Préparation du remplacement de libusb-0.1-4 2:0.1.12-14ubuntu0.1 (en utilisant .../libusb-0.1-4_2%3a0.1.12-14ubuntu0.2_i386.deb) ...
Dépaquetage de la mise à jour de libusb-0.1-4 ...
Paramétrage de libusb-0.1-4 (2:0.1.12-14ubuntu0.2) ...

Traitement des actions différées (« triggers ») pour « libc-bin »...
ldconfig deferred processing now taking place
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Reading extended state information
Initializing package states... Fait

Current status: 0 updates [-1].

D'où ça viens, d'où ça sort, je sais pas (ma dernière maj, avec dpkg dedans, a foiré sans que j'y prête attention ? après un petit tour dans /var/log/apt/term.log, oui, c'est bien ça, maj de dpkg le 15 juillet et ce fût une maj foireuse sans que je m'en rendre compte...).

Le coup du dpkg avec aucune permission, c'est pas très drôle comme blague du matin...

PS : j'ai aussi chmodé apt-get car y avait plus aucune permission non plus...

Aucun commentaire: