Hi, On Sat, 5 Dec 2015 23:43:49 +0000 "Manuel A. Fernandez Montecelo" <manuel.montez...@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@walnut] ls -ld /var/lib/apt/lists/partial drwx------ 2 _apt root 32768 Feb 9 17:23 /var/lib/apt/lists/partial [matijs@walnut] ls -ld /var/cache/apt/archives/partial drwx------ 2 _apt root 4096 Feb 9 14:44 /var/cache/apt/archives/partial [matijs@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
signature.asc
Description: OpenPGP digital signature