Sharing files between host and container

Hi,
I decided to use following way for that purpose:
lxc storage volume create lxc_pool wspolny
lxc storage volume attach lxc_pool wspolny lucek /mnt/wspolny

And it happened strange thing. In one container permissions are ok:
~# ls -l /mnt/
total 1
drwxr-xr-x 3 root root 4 Jun 2 00:55 wspolny
~#

but in the second are wrong and I don’t know how to fix it:

ls -l /mnt/

total 4
drwx–x--x 2 nobody nogroup 4096 May 29 16:13 wspolny
~#

Probably I did something different for both of them but I don’t know what exactly because I did that in different time eh. Please help.

Ok I’ve found solution myself.

I decided to delete that creepy volume:
zfs umount lxc_pool/custom/default_wspolny
lxc storage volume detach lxc_pool wspolny lucek
lxc storage volume detach lxc_pool wspolny seafile-ready
lxc storage volume delete lxc_pool wspolny

and then create it from the begening:
lxc storage volume create lxc_pool wspolny
lxc storage volume attach lxc_pool wspolny lucek /mnt/wspolny
lxc storage volume attach lxc_pool wspolny seafile-ready /mnt/wspolny
zfs set mountpoint=/mnt/wspolny lxc_pool/custom/default_wspolny
zfs mount lxc_pool/custom/default_wspolny

and now all is working :slight_smile: I have /mnt/wspolny on host and in containers and permissions are everywhere appropriate

Cheers to myself :wink:

1 Like