Share folder errors using shiftfs

@tomp Oh I thought I did, but perhaps I pasted the incorrect config from my notes.

Here it goes… The config below is is after I enter

lxc config set nextcloud security.privileged true

then

lxc restart nextcloud

where the error message

Error: Failed to handle idmapped storage: invalid argument - Failed to change ACLs on /var/snap/lxd/common/lxd/storage-pools/default/containers/nextcloud/rootfs/var/log/journal Try lxc info --show-log nextcloud for more info

returns.

architecture: x86_64
config:
  image.architecture: amd64
  image.description: ubuntu 20.04 LTS amd64 (release) (20221003)
  image.label: release
  image.os: ubuntu
  image.release: focal
  image.serial: "20221003"
  image.type: squashfs
  image.version: "20.04"
  security.privileged: "true"
  volatile.base_image: 0c3a7ed4f4133852ca2b91d9157082a2cf53498f3c6cec97fb4a48661c01f1c8
  volatile.cloud-init.instance-id: ec30b506-0a8e-4f3f-a826-5c3b1249e001
  volatile.eth0.hwaddr: 00:16:3e:3c:96:5f
  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: '[]'
  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: b6ed334f-bbee-4e90-bd26-54a1ce9b8e54
devices:
  Weir:
    path: /home/ubuntu/server/Weir
    shift: "true"
    source: /home/mike/server/Weir/
    type: disk
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

When I unset the security.privileged, then start the container, it starts fine.

Funny thing is, I have another issue that I originally thought was unrelated.

In crafting the replies above, I went through these steps again to recreate it and copy directly from terminal.

When it starts again, there is no error or warning that comes up. When I try to enter the container using

lxc exec nextcloud bash

it replies with

bash: /root/.bashrc: Permission denied
root@nextcloud:~#

and the container, and Nextcloud, ends up being useless and inaccessible, which appeares to be a user, group, and ownership issue, not allowing www-data, or root, access to anything.

This happened prior to the original post, and I thought it was about an id shifting issue caused by my previous attempt to connect my host mounted folders into the containter, and before I attempted shiftfs.

I cleared this error up following a few hints from this post

And this one

The latter post helped me correct the uid/gid for the file system, and I used another container to compare.

There are much more details involved in these steps, and I don’t want to flood this post with more detail than may be necessary, or was requested in your replies. I appreciate your time.