I am on Ubuntu 18.04
. Every apt update && apt upgrade
results in
W: Download is performed unsandboxed as root as file '/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_bionic_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
I am aware that this has come up. My problem is that as per this answer, I already have
/var/lib/apt/lists
owned by _apt:root
, recursively: I've already run
sudo chown -Rv _apt:root /var/lib/apt/lists
And /var/lib/apt/lists/partial
is chmodded 700
, so _apt
should have write access fine.
Additional info:
This all started when I symlinked /var/lib
elsewhere, to a directory under /root/
.
I had to do this because although I have root access, the machine was set up by someone else at work with /var
as a separate partition. It was too small and got full, so the move+symlinking was the solution at the time.
Edit
Following the accepted answer, I moved the symlink target from under /root/
; the warning is gone.