[Bug 1543280] Re: Synaptic fails with "W: Can't drop privileges for downloading as file '/root/.synaptic/tmp//tmp_sh' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)"

kroenecker 1543280 at bugs.launchpad.net
Wed Nov 9 01:55:02 UTC 2016


*** This bug is a duplicate of bug 1522675 ***
    https://bugs.launchpad.net/bugs/1522675


Check to see if you have an _apt user:

cat /etc/passwd | grep apt

_apt:x:105:65534::/nonexistent:/bin/false

If you do, no need to add the user. Otherwise,

adduser --force-badname --system --home /nonexistent --no-create-home
--quiet _apt || true

I haven't verified that it creates precisely the user necessary. If I
remember correctly, /bin/false means no shell access so make sure the
user created does in fact have /bin/false in passwd. Also it has no
group (65534). That is it really.

Finally check the directory situation:

ls -la /var/lib/update-notifier/package-data-downloads/

drwxr-xr-x 2 _apt root 4096 Nov 9 10:23 partial

As you can see "_apt" is properly listed as the owner. If not,

sudo chown _apt /var/lib/update-notifier/package-data-downloads/partial/

My system already had an _apt user, but did not have proper directory
permissions. At least, I have to assume that this is a proper fix. If
not, somebody more knowledgeable should be speaking up and sorting this
out...

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to aptitude in Ubuntu.
https://bugs.launchpad.net/bugs/1543280

Title:
  Synaptic fails with "W: Can't drop privileges for downloading as file
  '/root/.synaptic/tmp//tmp_sh' couldn't be accessed by user '_apt'. -
  pkgAcquire::Run (13: Permission denied)"

Status in aptitude package in Ubuntu:
  Confirmed

Bug description:
  Fails on all sorts of Xenial package installs.

  Please update this ticket with manual fix for this, to facilitate
  Xenial testing.

  Thanks.
  __________

  Two simple examples...

  1) aptitude changelog apt > /dev/null

  2) echo 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true' | debconf-set-selections
       apt-get -yqq install ttf-mscorefonts-installer
  ___________

  There are several bugs related to this problem. None have a fix
  specified + all are opened against random packages, rather than
  aptitude.

  Several of these bugs have been closed saying problem is fixed in apt-1.1.2 + above which is incorrect.
  ___________

  lsb_release -a
  No LSB modules are available.
  Distributor ID:	Ubuntu
  Description:	Ubuntu Xenial Xerus (development branch)
  Release:	16.04
  Codename:	xenial

  apt-get --version
  apt 1.1.10 (amd64)
  Supported modules:
  *Ver: Standard .deb
  *Pkg:  Debian dpkg interface (Priority 30)
   Pkg:  Debian APT solver interface (Priority -1000)
   S.L: 'deb' Debian binary tree
   S.L: 'deb-src' Debian source tree
   Idx: Debian Source Index
   Idx: Debian Package Index
   Idx: Debian Translation Index
   Idx: Debian dpkg status file
   Idx: Debian deb file
   Idx: Debian dsc file
   Idx: Debian control file
   Idx: EDSP scenario file

  aptitude --version
  aptitude 0.7.4 compiled at Dec  9 2015 19:30:45
  Compiler: g++ 5.3.1 20151207
  Compiled against:
    apt version 5.0.0
    NCurses version 6.0
    libsigc++ version: 2.6.2
    Gtk+ support disabled.
    Qt support disabled.

  Current library versions:
    NCurses version: ncurses 6.0.20151024
    cwidget version: 0.5.17
    Apt version: 5.0.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/1543280/+subscriptions



More information about the foundations-bugs mailing list