Hi!
I just did an apt-get dist-upgrade, and ran into an old problem: Some crucial executables had their permissions set to 000, sometimes breaking the upgrade process. The list is as follows:
/usr/sbin/tunelp, /usr/sbin/ntpdate, /usr/sbin/tcpdump, usr/sbin/rotatelogs, /usr/sbin/rdev, /usr/sbin/lpc, /usr/bin/lpr, /usr/bin/scp, /usr/bin/lpq, /usr/bin/lprm, /usr/bin/eject, /usr/bin/ssh, /bin/mount, /bin/umount, /sbin/fsck, /sbin/ctrlaltdel, /sbin/fdisk, /sbin/fsck.minix, /sbin/halt, /sbin/hwclock, /sbin/init, /sbin/killall5, /sbin/mkfs, /sbin/mkfs.minix, /sbin/mkswap, /sbin/modprobe, /sbin/runlevel, /sbin/swapon
I had to set them back to their original permissions manually, and as this leaves quite an uneasy feeling, I'd like to avoid this in the future.
Thus, as an example, I tried to reinstall mount:
Code:
root@frostbox:/home/vinter# chmod 4755 /bin/mount
root@frostbox:/home/vinter# ls -l /bin/mount
-rwsr-xr-x 1 root root 84944 Aug 3 16:02 /bin/mount
root@frostbox:/home/vinter# apt-get clean
root@frostbox:/home/vinter# apt-get --reinstall install mount
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 19 not upgraded.
Need to get 206 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ftp.de.debian.org/debian/ sid/main mount i386 2.19.1-5 [206 kB]
Fetched 206 kB in 0s (208 kB/s)
(Reading database ... 267672 files and directories currently installed.)
Preparing to replace mount 2.19.1-5 (using .../mount_2.19.1-5_i386.deb) ...
Unpacking replacement mount ...
Processing triggers for man-db ...
Setting up mount (2.19.1-5) ...
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
root@frostbox:/home/vinter# ls -l /bin/mount
---------- 1 root root 84944 Aug 3 16:02 /bin/mount
Seems to be reproducable, but it has nothing to do with the package: #debian on FreeNode tells me noone has experienced similar problems with it.
The package source should be OK:
Code:
root@frostbox:/home/vinter# apt-cache policy mount
mount:
Installed: 2.19.1-5
Candidate: 2.19.1-5
Version table:
*** 2.19.1-5 0
500 http://ftp.de.debian.org/debian/ sid/main i386 Packages
100 /var/lib/dpkg/status
ftp.us.debian.org exhibits the same problems.
Trying to get further detail:
Code:
root@frostbox:/var/cache/apt/archives# dpkg -D10 -i mount_2.19.1-5_i386.deb
I get the following:
http://pastebin.com/70DyEQY4
of which this excerpt should be interesting:
Code:
D000010: tarobject ti->name='.' mode=40755 owner=0.0 type=53(d) ti->linkname='' namenode='/.' flags=2 instead='<none>'
D000010: tarobject ti->name='./bin' mode=40755 owner=0.0 type=53(d) ti->linkname='' namenode='/bin' flags=2 instead='<none>'
D000010: tarobject ti->name='./bin/umount' mode=104755 owner=0.0 type=48(-) ti->linkname='' namenode='/bin/umount' flags=2 instead='<none>'
D000010: ensure_pathname_nonexisting `/bin/umount.dpkg-new'
D000010: ensure_pathname_nonexisting `/bin/umount.dpkg-tmp'
D000010: tarobject ... stat override, uid=0, gid=0, mode=0000
D000010: tarobject ti->name='./bin/mount' mode=104755 owner=0.0 type=48(-) ti->linkname='' namenode='/bin/mount' flags=2 instead='<none>'
D000010: ensure_pathname_nonexisting `/bin/mount.dpkg-new'
D000010: ensure_pathname_nonexisting `/bin/mount.dpkg-tmp'
D000010: tarobject ... stat override, uid=0, gid=0, mode=0000
D000010: tarobject ti->name='./bin/findmnt' mode=100755 owner=0.0 type=48(-) ti->linkname='' namenode='/bin/findmnt' flags=2 instead='<none>'
D000010: ensure_pathname_nonexisting `/bin/findmnt.dpkg-new'
D000010: ensure_pathname_nonexisting `/bin/findmnt.dpkg-tmp'
As can be concluded from the log, umount and mount lose their permissions, while findmnt retains them. So, for some reason, tar is overriding the permissions just for the former. Logical step would be to reproduce this error manually:
Code:
root@frostbox:/var/cache/apt/archives# ar x mount_2.19.1-5_i386.deb
root@frostbox:/var/cache/apt/archives# tar xpf data.tar.gz
root@frostbox:/var/cache/apt/archives# ls -l bin/mount
-rwsr-xr-x 1 root root 84944 Aug 3 16:02 bin/mount
... what?
So, manual extraction yields a perfectly fine executable, but dpkg somehow seems to screw up.
Why?
Thank you for any help
Vinter
PS: Yes, I know I had a thread about this a year ago, but it went into the wrong direction when a Ubuntu repository was discovered in my sources.list. It was just for WINE and had nothing to do with the error in question. Maybe someone can help me now.