[Aptitude-devel] Bug#887624: new hardwired SetupAPTPartialDirectory foils non-root use

David Kalnischkies david at kalnischkies.de
Fri Jan 19 21:41:24 UTC 2018

Control: reassign -1 apt 1.6~alpha6

On Thu, Jan 18, 2018 at 10:31:53PM +0800, 積丹尼 Dan Jacobson wrote:
> There is something now hardwired into aptitude that no -o option can
> change that causes this to complain when run as a regular user.

For the record: There are -o options actually… (the ones changing the
location of the lists directory) but then you need to have a copy of
lists there, so probably not that workable in your situation.

> As you can see the user just wants to download some .debs including
> dependencies and is not interested in locking any files or updating any
> lists and you should let him do that.

This message is neither about locking nor about updating lists. It just
says that it couldn't apply permissions on a directory – that could be
a (small) security problem actually depending on which permissons you
started with apt couldn't change away from (argueably only if you are
root or doing something really dumb. Requires potentially both.)

> $ aptitude -y -o Debug::NoLocking=true -o Dir::Cache=/tmp --download-only install libbest-perl
> The following NEW packages will be installed:
>   libbest-perl
> 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
> Need to get 15.8 kB of archives. After unpacking 66.6 kB will be used.
> Get: 1 http://free.nchc.org.tw/debian unstable/main amd64 libbest-perl all 0.15-1 [15.8 kB]
> Fetched 15.8 kB in 0s (73.7 kB/s)
> Current status: 0 (+0) broken, 0 (+0) upgradable, 0 (-7302) new.
> W: chmod 0700 of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (1: Operation not permitted)

You realize that this is a *W*arning and that everything you asked to be
done was done? Non-zero exiting would in this case actually break
scripts and co for no good reason (as warnings are not a reason to stop
– if they were they would be errors. They are there to notify you about
problems you should look into next time you have enough time).

Anyhow, "stealing" this bugreport for apt as I "broke" it there and can
also solve it there (and we have the same thing going with 'apt'). In
your case the commit which should be posted by some automated process
soon is just hiding the warning as it spurious in your case (as noted
above) and solves also a few related ones (like not having the directory
at all).

Best regards

David Kalnischkies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20180119/d596877f/attachment.sig>

More information about the Aptitude-devel mailing list