— Homelab, Proxmox, NFS — 2 min read
Recently while configuring a new Ubuntu 24.04 container inside Proxmox VE, I ran into a subtle but frustrating issue: NFS shares mounted perfectly inside a VM, but failed inside the container with this cryptic message:
1mount.nfs: Operation not permitted
As someone who has done this before on Debian-based LXC containers, I knew it was possible—but something was different this time. This post outlines what caused the problem, how I investigated it, and how I resolved it properly by leveraging host-side bind mounts.
I had two Ubuntu-based environments:
mount.nfs
failed with Operation not permitted
.The NAS exports were configured correctly:
1showmount -e 192.168.0.252/volume1/sharedfolder 192.168.0.200
The container’s IP was 192.168.0.200
. NFS permissions on Synology were confirmed, root squash was disabled, yet the error persisted.
mount()
for NFSUnprivileged containers in Proxmox share the host kernel and are isolated using user namespaces. This means even "root" inside the container has no CAP_SYS_ADMIN
in the host context. Mounting NFS requires kernel-level mount()
system calls—which are blocked.
This is a design choice for security and container isolation. While privileged containers can bypass this, they come with increased risks.
Instead of fighting container restrictions, I took the cleaner, more secure approach: mount the NFS share on the Proxmox host, then bind-mount it into the container.
1mkdir -p /mnt/nas2mount -t nfs 192.168.0.25:/volume1/sharedfolder /mnt/nas
Add to /etc/fstab
for persistence:
1192.168.0.25:/volume1/sharedfolder /mnt/nas nfs defaults 0 0
Edit container config:
1nano /etc/pve/lxc/117.conf
Add this line:
1mp0: /mnt/nas,mp=/nas2
This maps /mnt/nas
on the host to /nas2
inside the container.
You can check the Container -> Resources, new Mount Point appeared:
1pct restart 117
Inside the container:
1ls /nas2
You should now see the mounted NAS contents.
After editing the config, Proxmox UI under Resources shows:
1Mount Point (mp0) /mnt/nas,mp=/nas2
Clean and UI-friendly.
This is a great example of understanding container limitations and working with them, not against them. While mounting directly inside a container feels natural, in the world of LXC, sometimes the cleanest path is to let the host do the heavy lifting.
By bind-mounting your NAS share into the container, you get: