After upgrade of server from 18.04 to 22.04 I have an issue inside a container:
» LANG=C apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
W: chown to _apt:root of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
W: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (1: Operation not permitted)
W: chmod 0700 of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (1: Operation not permitted)
W: Download is performed unsandboxed as root as file '/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
W: Problem unlinking the file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal_InRelease - PrepareFiles (13: Permission denied)
W: chmod 0600 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_InRelease failed - Item::QueueURI (1: Operation not permitted)
W: Problem unlinking the file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal-updates_InRelease - PrepareFiles (13: Permission denied)
W: Problem unlinking the file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal-backports_InRelease - PrepareFiles (13: Permission denied)
W: Problem unlinking the file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal-security_InRelease - PrepareFiles (13: Permission denied)
W: chown to root:root of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0644 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0600 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_InRelease failed - Item::QueueURI (1: Operation not permitted)
W: chown to root:root of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0644 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0600 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-backports_InRelease failed - Item::QueueURI (1: Operation not permitted)
W: chown to root:root of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-backports_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0644 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-backports_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0600 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-security_InRelease failed - Item::QueueURI (1: Operation not permitted)
W: chown to root:root of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-security_InRelease failed - 201::URIDone (1: Operation not permitted)
W: chmod 0644 of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-security_InRelease failed - 201::URIDone (1: Operation not permitted)
E: Unable to read /var/lib/apt/lists/partial/ - open (13: Permission denied)
Here is the container config:
# lxc config show duniter
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 20.04 LTS amd64 (release) (20210819)
image.label: release
image.os: ubuntu
image.release: focal
image.serial: "20210819"
image.type: squashfs
image.version: "20.04"
limits.cpu: "4"
limits.memory: 4GB
volatile.base_image: 9c939141a94bbdcfd29b0b3be6dc135b9d3e8d73b19235f06de4593898e8b960
volatile.eth0.host_name: veth59b5d258
volatile.eth0.hwaddr: 00:16:3e:0c:78:5b
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: RUNNING
volatile.last_state.ready: "false"
volatile.uuid: 8debd7c2-ff7f-4090-8eac-aaaa8b55a046
devices:
eth0:
ipv4.address: 10.2.249.21
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: pool1
size: 100GB
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""