Shared folder between lxc containers

Francsico

New Member
Apr 14, 2020
1
0
1
33
Hello,

I want to use a lxc container that contains a shared directory of documents, for that I have two ubuntu LTS 18.04, in one I install Samba and configure to shared a directory, up to this point thit is OK and with a client Windows I can enter to the shared folder and with an lxc container as a client using cifs-utils I can see the shared folder but I can't mount this shared directory by CIFS.
The problem is when I try to edit /etc/fstab of the client lxc container to mount the shared folder, this trown an error of denied permission "mount error(1): Operation not permitted".
I search about in internet and find that error is when the lxc container is unprivileged, in others examples only shared between host and lxc container, but I don't find examples that uses shared folder between lxc containers.

How can I shared folder by samba between lxc containers not from the host? or Can you say me and other solution for share a documents directory?



Best regards, Francisco.
 
CIFS and NFS mounts are only possible in privileged containers, and even then you have to explicitly enable the "CIFS" feature in the container's options.