I get it after updating in Synaptic Manager

I recently did a clean install of Ubuntu 17.04 from 16.10.

error message:-

W: Download is performed unsandboxed as root as file '/var/cache/apt/archives/partial/samba-libs_2%3a4.5.8+dfsg-0ubuntu0.17.04.1_i386.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
  • 2
    Your running a process that needs root privileges as non-root... – George Udosen Apr 25 '17 at 15:16
  • 1
    It is known bug 1522675, after long discussion with developers it is fixed. Please wait some hours or one-two days. – N0rbert Mar 5 '18 at 7:01

Usually apt uses the user _apt to download packages. In your case _apt doesn't have write permission to either /var/cache/apt/archives/partial/ or an existing file /var/cache/apt/archives/partial/samba-libs_2%3a4.5.8+dfsg-0ubuntu0.17.04.1_i386.deb so it downloaded the file as root.

Make sure /var/cache/apt/archives/partial/ and everything below it are writeable for _apt, e.g. by running

sudo chown -Rv _apt:root /var/cache/apt/archives/partial/
sudo chmod -Rv 700 /var/cache/apt/archives/partial/
|improve this answer|||||
  • 3
    I have this problem while using a mounted folder autside of my vagrant VM, so the mounted folder is always belonging to the user vagrant which cannot be changed. How can I solve this there? maybe just disable the warning, because in my Test VM it is not a problem if apt is run by root – rubo77 Jun 21 '18 at 17:22
  • @rubo77 - This fixed that situation for me: github.com/fgrehm/vagrant-cachier/issues/… - setting an explicit owner in synced_folder_opts – Henk Aug 29 '18 at 14:13
  • It also helped me to run this command after chowning and chmoding: sudo chmod -Rv 755 /root/.synaptic/tmp. Afterward, no more error! – Ev- Nov 24 '18 at 7:54

I had this problem too on a Debian Stretch (fresh install of a Xen VM), turned out it was a problem with sudo.

Couldn't do any sudo on the machine.

More precisely, the root / directory of the system was in 700 (drwx------). A chmod 755 / fixed it.

|improve this answer|||||

Fix it with this:

sudo chown -R _apt:root /var/lib/apt/lists


  • The lists directory itself, not just its contents, needs to have owner _apt. (i.e. Here is one important file branch where default root ownership fails!)

  • I may have developed this issue when removing lists, and then re-making it with sudo mkdir lists; apt update, as advised elsewhere.

  • Also this solution may be IN ADDITION TO any other solutions, as I had first tried a bunch of other things.

Debian 10.2 Stretch.

# apt-get --version
apt 1.8.2 (amd64)
Supported modules:
*Ver: Standard .deb
*Pkg:  Debian dpkg interface (Priority 30)
 Pkg:  Debian APT solver interface (Priority -1000)
 Pkg:  Debian APT planner 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
 Idx: EIPP scenario file
|improve this answer|||||

Make the file itself readable by the _apt user. eg:

chmod 777 ./pdfsam-visual_2.1.4_amd64.deb

Have a look at the permissions of the file itself...

$ ls -l ./pdfsam-visual_2.1.4_amd64.deb 
-r-------- 1 john john 105659960 Apr  4 11:57 ./pdfsam-visual_2.1.4_amd64.deb

Now that message again...

N: Download is performed unsandboxed as root as file
 'pdfsam-visual_2.1.4_amd64.deb' couldn't be accessed 
by user '_apt'. - pkgAcquire::Run (13: Permission denied)

The error is because user _apt wants to access the local file. So you only need to grant access to this file. eg:

Now if you remove and install the error will be gone.

sudo apt remove pdfsam-visual
sudo apt install ./pdfsam-visual_2.1.4_amd64.deb
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.