Nfs: wrong owner (sshd) - how to fix permissions?

Hi there,

I’m running Rancher on a Freenas VM and want to integrate a NFS share for my volumes as explained in: https://www.youtube.com/watch?v=RNhqvx8y_8A

I’m using these settings:

#cloud-config

# /var/lib/rancher/conf/cloud-config.d/nfs.yml

# https://github.com/rancher/os/issues/641
write_files:
  - path: /etc/rc.local
    permissions: "0755"
    owner: root
    content: |
      #!/bin/bash
      [ ! -e /usr/bin/docker ] && ln -s /usr/bin/docker.dist /usr/bin/docker

rancher:
  services:
    nfs:
      image: walkerk1980/rancher-nfs-client
      labels:
        io.rancher.os.after: console, preload-user-images
        io.rancher.os.scope: system
      net: host
      privileged: true
      restart: always
      volumes:
      - /usr/bin/iptables:/sbin/iptables:ro
      - /mnt/nfs-1:/mnt/nfs-1:shared
      environment:
        SERVER: 192.168.1.63
        SHARE: /mnt/tb2/docker

The problem is that this results in owner/group: sshd.input
If I create a new docker container, it cannot write due to permissions.

Can anyone tell me how to fix this?
Should I specify the user in the config?

Thank you,
Christoph

I’m in that exact situation. I can get it to work, and I can write files to it from every docker host in the swarm, but the docker containers can’t write.

I fixed this on my deployment and have detailed my process here: