Hello there,
New to the forum, but not to the YT channel, love the content! 🙂
I’m rebuilding my home lab and changing how I do things.
I have my NAS setup with a NFS share and a specific user owner of it, with a defined uid/gid (ex:1234). My goal is to restrict access to it to a group of containers and VMs. I also set allowed hostnames and IPs to access it.
I deployed a Ubuntu server and manually created a user with the same uid/gid as the one owning the NFS share.
From Ubuntu, I am able to mount the share, access it, write etc… when logged in with the uid=1234 user. So far so good. Entry has been added to fstab.
With that same user, I installed Docker and then edited the « /lib/systemd/system/docker.service » file to add the « —data-root /MyNFS/MountPoint/docker » argument. Copied over the files that the documentation said to move.
However, after rebooting it fails to start Docker and the journalctl file mentions the following error: « could not create or set daemon root permissions: /MyNFS/MountPoint/docker: chown /MyNFS/MountPoint/docker: operation not permitted ».
I tried adding the user to the docker group, or root to the 1234 gid group, but none of that worked.
I thought that running Docker as the 1234 uid user, it would be able to access and write in the share.
What do I need to do for Docker to start and be able to write in the share, but still limiting access to the nfs share to uid/gid 1234?
Cheers 🙂