Bug#813786: apt: Warning "Can't drop privileges" when running "apt-get source" as root
Package: apt
Version: 1.2.1
Severity: normal
Simple to reproduce:
$ LANG=C sudo apt-get source debian-installer
[sudo] password for rhertzog:
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'debian-installer' packaging is maintained in the 'Git' version control system at:
git://git.debian.org/d-i/debian-installer.git
Please use:
git clone git://git.debian.org/d-i/debian-installer.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 1 373 kB of source archives.
Get:1 http://nas/debian unstable/main debian-installer 20160106 (dsc) [3 434 B]
Get:2 http://nas/debian unstable/main debian-installer 20160106 (tar) [1 370 kB]
Fetched 1 373 kB in 0s (26,2 MB/s)
dpkg-source: info: extracting debian-installer in debian-installer-20160106
dpkg-source: info: unpacking debian-installer_20160106.tar.gz
W: Can't drop privileges for downloading as file 'debian-installer_20160106.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
$ ls -ald debian-installer*
drwxr-xr-x 5 root root 4096 janv. 1 16:27 debian-installer-20160106
-rw-r--r-- 1 root root 3434 janv. 6 06:12 debian-installer_20160106.dsc
-rw-r--r-- 1 root root 1370014 janv. 6 06:12 debian-installer_20160106.tar.gz
There's no such error when you run apt-get source as a normal user (which
is the usual case).
-- Package-specific info:
-- System Information:
Debian Release: stretch/sid
APT prefers squeeze-lts
APT policy: (500, 'squeeze-lts'), (500, 'oldoldstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages apt depends on:
ii adduser 3.113+nmu3
ii debian-archive-keyring 2014.3
ii gnupg 1.4.20-1
ii gnupg2 2.1.11-2
ii gpgv 1.4.20-1
ii libapt-pkg5.0 1.2.1
ii libc6 2.21-7
ii libgcc1 1:5.3.1-7
ii libstdc++6 5.3.1-7
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none>
ii aptitude 0.7.5-3
ii dpkg-dev 1.18.4
ii python-apt 1.1.0~beta1
ii synaptic 0.83+b1
-- no debconf information
Reply to: