Replies: 1 comment 3 replies
-
Mounting NFS requires CAP_SYS_ADMIN so you could do You are not allowed to do this in Rootless mode. Theoretically you could use a fuse implementation of NFS and then you could mount it within a user namespace without CAP_SYS_ADMIN. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running an application inside ubuntu:22.04 container (with systemd) that execute NFS mount command to external mounts.
TL:DR
I can execute successfully the mount command when the container is running with
--privileged
flag BUT when running the container without it, I'm gettingmount.nfs: mount(2): Permission denied
error. I'm looking for a way not to use the privileged flag.Details
NFS Server
In
/etc/exports
I have this mount/mnt/nfs_share *(rw,sync,no_subtree_check)
NFS Client
Dockerfile
To build and run the container use the following commands
--security-opt label=disable
flag it didn't help.--cap-add ALL
to make sure it's not an issue related to a specific capInside the container, to create the share:
Getting this error:
ufw status
->Status: inactive
/mnt/nfs_share *(rw,sync,no_subtree_chec,insecure)
, same errorBeta Was this translation helpful? Give feedback.
All reactions