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


#1

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