<div dir="ltr"><div dir="ltr"><div class="gmail_attr">Hi Daniel,</div><div class="gmail_attr">My XML has an <interface> section. According to documentation <a href="https://libvirt.org/drvlxc.html#securenetworking">https://libvirt.org/drvlxc.html#securenetworking</a> I have also tried with and without <privnet/> parameter<code>,</code> but still files under /proc/net is owned by user: nobody.</div>A<span>s might be expected there is no such problem in privileged containers, as root user is same as on host and files in /proc/net is then owned by root, but to follow best practices I would like to use unprivileged containers.</span></div><div><span>I've used Fedora 33 as host and container. Could you check if this is reproducible on your setup?</span></div><div dir="ltr"><span><br></span></div><div><span>BR,</span></div><div><span>John<br></span></div><div dir="ltr"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Thu, Dec 24, 2020 at 12:21 PM Daniel P. Berrange <<a href="mailto:dan@berrange.com">dan@berrange.com</a>> wrote:<br></div></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Dec 22, 2020 at 07:14:23PM +0200, John Hurnett wrote:<br>
> Hi,<br>
> I've encountered a problem that some of /proc/net/ files can't be accessed<br>
> in unprivileged containers, because it is owned by nobody:nogroup (-1:-1)<br>
> and have 440 permissions.<br>
> This exact issue was solved in LXC project by unsharing netns:<br>
> <a href="https://github.com/lxc/lxc/commit/5b1e83cbc498cd3edeaf13afa987d530299a35a7" rel="noreferrer" target="_blank">https://github.com/lxc/lxc/commit/5b1e83cbc498cd3edeaf13afa987d530299a35a7</a><br>
> . Maybe it could be similarly fixed on libvirt-lxc?<br>
<br>
We already unshare netns when there is an <interface> in your XML<br>
config for the container. Is that still leaving the permissions<br>
issues ? If so maybe its an ordering issue for the unshare.<br>
<br>
Regards,<br>
Daniel<br>
--<br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a>      -o-    <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a>         -o-            <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a>    -o-    <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/dberrange</a> :|<br>
<br>
</blockquote></div></div></div>