Root acces to container

Hi i crash my server,

I follow your doc.

The basic steps were:

  • i install/setting an ubuntu 24.04.5 LTS on my server.
  • installed incus from apt with zabbly repos.
  • restored /var/lib/incus from archive
  • restored /etc/subuid and /etc/subgid
  • restarted incus services

I can see my 8 container running, but
i cannot acces with:

incus exec alpine-sslproxy – su -l root
su: can’t change directory to ‘/root’: Permission denied

2 container do not have problem.
6 container do not work.

Best Regards.

For precision.

I have 3 containers working and 5 not working.

alpine-labo 2026/11/03 ok
ubuntu-influx 2026/09/19 ok
alpine-ntfy-rs 2026/09/22 ok

alpine-forgeojo 2026/04/09 hs
alpine-mdbook 2026/04/10 hs
alpine-memos 2026/04/11 hs
alpine-mochi 2026/05/04 hs
alpine-sslproxy 2026/04/11 hs

Best regards

incus exec alpine-forgeojo sh should get you a shell, then you can ls -lh / to see what’s up with permissions in there.

Hi

incus exec alpine-forgeojo sh
~ # ls -lh /
total 52K
drwxr-xr-x 2 nobody nobody 4.0K Nov 3 10:23 bin
drwxr-xr-x 9 root root 500 Nov 3 13:57 dev
drwxr-xr-x 27 nobody nobody 4.0K Nov 3 10:23 etc
drwxr-xr-x 3 nobody nobody 4.0K Nov 3 10:23 home
drwxr-xr-x 7 nobody nobody 4.0K Nov 3 10:23 lib
drwxr-xr-x 5 nobody nobody 4.0K Nov 3 10:23 media
drwxr-xr-x 2 nobody nobody 4.0K Nov 3 10:23 mnt
drwxr-xr-x 2 nobody nobody 4.0K Nov 3 10:23 opt
dr-xr-xr-x 371 nobody nobody 0 Nov 3 13:57 proc
drwx------ 2 nobody nobody 4.0K Nov 3 10:23 root
drwxr-xr-x 4 root root 240 Nov 3 13:57 run
drwxr-xr-x 2 nobody nobody 4.0K Nov 3 10:23 sbin
drwxr-xr-x 2 nobody nobody 4.0K Nov 3 10:23 srv
dr-xr-xr-x 13 nobody nobody 0 Nov 3 13:57 sys
drwxr-xr-t 4 nobody nobody 4.0K Nov 3 10:23 tmp
drwxr-xr-x 8 nobody nobody 4.0K Nov 3 10:23 usr
drwxr-xr-x 11 nobody nobody 4.0K Nov 3 10:24 var

I don’t know what is mean.

Thank.

How do things look like on disk when the container is running and you look at ls -lh /var/lib/incus/containers/alpine-forgeojo/rootfs/?

Hi,

ls -lh /var/lib/incus/containers/alpine-forgeojo/rootfs/
total 68K
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 bin
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 dev
drwxr-xr-x 27 root root 4.0K Nov 3 10:23 etc
drwxr-xr-x 3 root root 4.0K Nov 3 10:23 home
drwxr-xr-x 7 root root 4.0K Nov 3 10:23 lib
drwxr-xr-x 5 root root 4.0K Nov 3 10:23 media
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 mnt
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 opt
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 proc
drwx------ 2 root root 4.0K Nov 3 10:23 root
drwxr-xr-x 3 root root 4.0K Nov 3 10:23 run
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 sbin
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 srv
drwxr-xr-x 2 root root 4.0K Nov 3 10:23 sys
drwxr-xr-t 4 root root 4.0K Nov 3 10:23 tmp
drwxr-xr-x 8 root root 4.0K Nov 3 10:23 usr
drwxr-xr-x 11 root root 4.0K Nov 3 10:24 var

Thank.

Okay, stop that container and show incus config show --expanded alpine-forgeojo
The data on disk isn’t shifted so it should be pretty easy to fix the volatile keys to align with that.

Hi,

architecture: aarch64
config:
image.architecture: arm64
image.description: Alpine 3.23 arm64 (20260331_13:00)
image.os: Alpine
image.release: "3.23"
image.requirements.secureboot: "false"
image.serial: '20260331_13:00'
image.type: squashfs
image.variant: default
volatile.base_image: ca81b860a5c1bdc8d4560616f8f5d492dde095c0389069b815dcee70d62b9102
volatile.cloud-init.instance-id: 5e6e843b-e167-4f0c-9d25-e2ebd062e246
volatile.eth0.hwaddr: 00:16:3e:11:fe:b4
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: STOPPED
volatile.last_state.ready: "false"
volatile.uuid: 7245e15a-0141-498f-803f-d96b477bf3d8
volatile.uuid.generation: 7245e15a-0141-498f-803f-d96b477bf3d8
devices:
eth0:
name: eth0
network: incusbr0
type: nic
root:
path: /
pool: incus-storage-dir
size: 24GiB
type: disk
www-redirect:
connect: tcp:10.89.53.240:3000
listen: tcp:192.168.1.47:80
type: proxy
ephemeral: false
profiles:

* default
  stateful: false
  description: ""

Thank.

Try incus config set alpine-forgeojo volatile.last_state.idmap "[]" and then start the container back up.

Hi i try your command, but

incus config set alpine-forgeojo volatile.last_state.idmap “[]”
Warning: the “ ” syntax is deprecated; please switch to the = syntax

Thank.

the message is " swich to the key value syntax "

Hello,

i try incus config set alpine-forgeojo volatile.last_state.idmap=“”

seems to work (no error message)

After starting my instance alpine-forgeojo

I get access with incus exec alpine-forgeojo – su -l root

But i have my service forgejo scrached.

I try to understand why.

Thank.

I have some problem with my forgejo.

It’s sems problem are link with right of file.

I log with root

incus exec alpine-forgeojo – su -l root
rc-service forgejo start
2026/11/05 15:04:33 …s/setting/setting.go:94:InitCfgProvider() [F] Unable to init config provider from “/etc/forgejo/app.ini”: unable to check if “/etc/forgejo/app.ini” is a file. Error: stat /etc/forgejo/app.ini: permission denied

Le service est configuré avec le user git.
The service is set with the git user.

alain@incus-radxa:~$ incus exec alpine-forgeojo – su -l git

alpine-forgeojo:~$ forgejo --config /etc/forgejo/app.ini
2026/11/05 15:03:07 …s/setting/setting.go:94:InitCfgProvider() [F] Unable to init config provider from “/etc/forgejo/app.ini”: unable to check if “/etc/forgejo/app.ini” is a file. Error: stat /etc/forgejo/app.ini: permission denied

I will create a new container with a forgejo and compare file right, to aplly the same on my prod container.

Thank.

Hi Stephane,

Thank a lot, i have fix 6 containers
alpine-labo ok
alpine-ntfy-rs ok
alpine-sslproxy ok
alpine-mochi ok
alpine-memos ok
alpine-mdbook ok

exept alpine-forgeojo 2026/04/09 hs

With your command:
incus config set alpine-mochi volatile.last_state.idmap=“”
I have root access on my contain, and i can check and change file owner and permission.

All my problems are due to my archive files, after my server crash i do a copy from my archive.

For my last unfix container alpine-foegeojo i can’t fix it.
I have an archived tar for this container but not up to date.
forgeojo-11092026.tar.gz

I have all my git on my linux workstation,

if i restore my old alpine-forgeojo. perhaps i can resync my git from my desktop to my server forgejo?

Thank.

Alain.