Hello!
I’m having a problem accessing my host storage from my new VM, created using
lxc launch images:archlinux/desktop-gnome al --vm -c limits.cpu=8 -c limits.memory=8GiB --console=vga
then I stopped it and
lxc config set al raw.idmap "both 1000 1000"
lxc config device add al storage disk source=/mnt/storage/ path=/mnt/storage/
and started it again.
My host user id is
uid=1000(admin) gid=1000(autologin) grupos=1000(autologin),3(sys),90(network),98(power),960(lxd),985(video),991(lp),998(wheel)
My guest user id is
uid=1000(archlinux) gid=1000(archlinux) groups=1000(archlinux),984(users),985(video),999(adm)
So I change to my /mnt/storage/data and do mkdir test-dir
. No problem. Then cd test-dir
. All ok.
Then touch test
. The file is created, but I get a message
touch: setting times of 'test': Stale file handle
ls -la
drwxr-xr-x 2 archlinux archlinux 4096 Feb 22 09:03 .
drwxr-xr-x 5 archlinux archlinux 4096 Feb 15 19:51 ..
-rw-r--r-- 1 archlinux archlinux 0 Feb 22 09:03 test
But I can’t change, edit, move or delete the file in the VM. And yes, the host can do any file operation with it.
rm: cannot remove 'test': Permission denied
mv: cannot open 'test' for reading: Stale file handle
What am I doing wrong?