[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#813786: apt: Warning "Can't drop privileges" when running "apt-get source" as root



On Fri, 05 Feb 2016, Julian Andres Klode wrote:
> Control: forcemerge 812511 -1

Sorry, I missed it as I only looked for bugs matching "apt-get source".

> > 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)
> 
> Yeah, isn't that great?
> 
> I don't get why there are bug reports about that. If you fetch in a directory
> _apt cannot write to, it will run the fetchers as root instead of _apt so you
> can do whatever foolish (no root needed here) task you are trying to do.

What confuses me is that the warning comes well after the other
messages... if it was before the lines showing the download it would have
been clearer.

And then "accessed" -> "created" would be clearer for the end user.

Also it could also be explicit that it will continue the download as root.

Here's my suggestion:

W: '%s' can't be created by user '_apt', continuing the download as root instead.

> While we might want to solve this at some point, this is no huge deal, and
> would require a huge amount of work to fix.

No problem.

> Of course not. If you are not root than we setuid and friends won't
> work anyway, so we don't even try.

We could tell the same with “directory is not writable by "_apt" so we
don't even try” ... :)

But you know the codebase and I don't so I trust your judgment.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/


Reply to: