<div dir="ltr"><div dir="ltr"><div>I investigated further and if I <br></div><div>chown 101001.101001 autossh</div><div>in the NFS mounted directtory in the host, everything works for that particular user.</div><div><br></div><div>But I cannot e.g. <br></div><div># adduser foo<br>Adding user `foo' ...<br>Adding new group `foo' (1002) ...<br>Adding new user `foo' (1002) with group `foo' ...<br>Creating home directory `/home/foo' ...<br>Stopped: chown 1002:1002 /home/foo: Operation not permitted<br><br></div><div>in the container... <br></div><div><br></div><div>I already changed the NFS share subtree ownership to the mapped one (42000 in my case) and asked to disable subtree check from the share (not yet done).</div><div><br></div><div>This must be something with the difference of normal directory and NFS but what...?</div><div><br></div><div>Thanks,</div><div>Kaj</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 20 Feb 2019 at 00:23, Kaj Wiik <<a href="mailto:kaj.wiik@iki.fi">kaj.wiik@iki.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi!</div><div><br></div><div>I have set up an unprivileged container with bind mount /home from NFS share mounted on host.</div><div><br></div><div>The /home directory has been mapped to root in the container:<br></div><div>printf "uid 42000 0\ngid 42000 0\n" | lxc config set container raw.idmap -</div><div><br></div><div>The problem is that chown does not work, e.g.:</div><div>chown: changing ownership of '/home/autossh/.ssh': Operation not permitted </div><div><br></div><div>If I change the target directory to a 'normal' one instead of NFS mounted, everything works.</div><div><br></div><div>Any ideas, please....</div><div><br></div><div>NFS v3 and v4, lxc --version 3.0.3<br><br></div><div>Thanks,</div><div>Kaj</div><div><br></div></div></div></div></div>
</blockquote></div>