Remote shares in an unprivileged Incus container

What methods are available for mounting a remote share such as an SMB/CIFS, NFS, or SSHFS share inside an unprivileged Incus container while also properly mapping user IDs between the container and remote file systems?

sshfs should work just fine when initiated from within the container, the others don’t work and require the mount to be done on the host and passed to the container, but that can’t currently be shifted as cifs and nfs don’t support VFS idmap at this stage.

There are FUSE implementations of NFSv3 and basic CIFS so you could use that inside the container to mount things.

4 Likes

What is the sane way to mount an nfs share for example on the host then pass it to the container while working with an unpriviledged container? I have tried mount --bind /mnt/nfsshare /srv/nfs4 that is yet to work…