0

All systems involved in this question are Ubuntu 18.04.1 or flavors.

I've successfully set up a local mirror on my home server. All the other systems on our LAN are able to connect to the mirror and do updates and upgrades without any warnings or errors. They connect over ssh (because, reasons) using sources.list statements like this:

deb ssh:[server_name]/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted

The server itself uses sources.list statements like this:

deb file:[directory]/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted

The server system can successfully do updates and upgrades, but it always emits a warning (or maybe a note) like this:

N: Download is performed unsandboxed as root as file '[directory]/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/dists/bionic/InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

I added the user _apt to the group which has access to the mirror, but that didn't have any effect. That doesn't make sense to me because if the warning means what it says, that should have fixed it.

How can I correct the situation to get rid of this note/warning?

  • Thanks @muru. That is a somewhat different message than I'm seeing, but if it just means "apt is accessing already downloaded files", I'll quit worrying about it. – Organic Marble Aug 7 '18 at 1:37
  • I believe the core problem is the "file couldn't be accessed by user '_apt'" part (the other messages just stem from this issue). Fixing the ownership of the relevant directories and files using commands similar to the one in the second answer should be enough. – muru Aug 7 '18 at 1:41
  • Great, thanks for the additional info. The difference in the messages is why I didn't find that when searching for an answer. – Organic Marble Aug 7 '18 at 1:43

Browse other questions tagged or ask your own question.