0

So,

I am working in an environment where my target system isn't connected to the internet and I don't have admin on my Ubuntu box that is connected to the internet. I'm trying to create an offline Ubuntu repo for my target Ubuntu 17.10 system.

To do this, I downloaded the source for apt-mirror and modified the apt-mirror perl script so that it points to an external hard drive: it reads a repo list stored on the external drive and downloads it onto the hard drive, which is formatted ext4. This successfully downloaded all 75.8 GB or whatever of the 17.10 amd64 repository.

However, I'm experiencing weird errors when I try to use this repository on my target 17.10 laptop. I changed the permission on every file in the repo to be 777 (ugo+rwx) but I'm still getting the errors

Err:6 file:/media/username/hdd/mirror/archive.ubuntu.com/ubuntu artful/main DEP-11 64x64 Icons
Could not open file /var/lib/apt/lists/partial/_media_username_hdd_mirror_archive.ubuntu.com_ubuntu_dists_artful_main_dep11_icons-64x64.tar - open (13:Permission denied)

And this error is preventing me from using the repo at all. I can successfully connect my target system to the internet and download packages but can't retrieve them from the repo stored on my drive. What could be causing this issue? I can post more information if it helps narrow down the problem. I have tried Googling the problem and searching stack exchange but haven't found anything that seems to solve it.

I have tried changing the permissions on /var/lib/apt/lists/partial but to allow read and write from all users but it just changes back to only allowing root as soon as I run apt-get update again.

Thanks so much for any help you can provide.

It is a similar error but not identical to https://lists.debian.org/debian-user/2017/04/msg00070.html

1 Answers1

0

Success! I have figured out my issue. It was a couple of things.

Firstly, the issue I was having is partly a duplicate of this:

Ubuntu 16.04 apt-get update doesn't work with local repository

But I was also having an issue where the Translation-en file was for some reason not visible to the OS. To solve that problem I used the answer to this question:

How can I remove the Translation entries in apt?