[Aptitude-devel] Bug#806595: aptitude: Changelog download throws warning: "W: Can't drop privileges for downloading as file '/tmp/aptitude-root.15442:qGi6mn/aptitudeDownload6J+8J:+PsVGmTNm^.^::Lz:%.Hi55VKA' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)"

Matijs van Zuijlen matijs at matijs.net
Tue Feb 9 17:41:00 UTC 2016


Hi,

On Sat, 5 Dec 2015 23:43:49 +0000 "Manuel A. Fernandez Montecelo"
<manuel.montezelo at gmail.com> wrote:
> Hi,
> 
> 2015-11-29 13:29 Axel Beckert:
> >Package: aptitude
> >Version: 0.7.4-2
> >
> >Hi,
> >
> >on the commandline as well in the TUI, aptitude throws a warning when
> >trying to download and display a changelog as root as well as user:
> >
> >As root:
> >
> ># aptitude changelog apt > /dev/null
> >W: Can't drop privileges for downloading as file '/tmp/aptitude-root.15442:qGi6mn/aptitudeDownload6J+8J:+PsVGmTNm^.^::Lz:%.Hi55VKA' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
> >#
> 
> That's because libapt attempts to drop privileges and perform operations
> as "_apt" user, but since the directory is owned by root, it cannot drop
> them (otherwise it would fail to write) and emits the warning.

Is there any way to avoid this warning? It is especially annoying in the TUI,
since it creates a pop-up that needs to be dismissed.

Please note that apt-get does not show this warning, so it doesn't seem to be an
essential feature of the fetching of the change log.

> So
> 
> >As user:
> >
> >% aptitude changelog apt > /dev/null
> >W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
> >W: chmod 0700 of directory /var/cache/apt/archives/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
> 
> I suppose that as normal user, libapt doesn't do the check mentioned
> above (perhaps because uid!=root and assumes that it's "_apt").
> 
> In my system, both dirs' permissions are 700 and owned by _apt:root, it
> doesn't emit any error and changelog works fine, no warnings.

On my system, these dirs have the same permission and owners, but I do get the
warnings:

[matijs at walnut] ls -ld /var/lib/apt/lists/partial
drwx------ 2 _apt root 32768 Feb  9 17:23 /var/lib/apt/lists/partial
[matijs at walnut] ls -ld /var/cache/apt/archives/partial
drwx------ 2 _apt root 4096 Feb  9 14:44 /var/cache/apt/archives/partial
[matijs at walnut] aptitude changelog apt > /dev/null
W: chmod 0700 of directory /var/lib/apt/lists/partial failed -
SetupAPTPartialDirectory (1: Operation not permitted)
W: chmod 0700 of directory /var/cache/apt/archives/partial failed -
SetupAPTPartialDirectory (1: Operation not permitted)

It seems something else must be wrong.

Kind regards,
-- 
Matijs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20160209/964ab982/attachment.sig>


More information about the Aptitude-devel mailing list