Comment 3 for bug 1665943

Revision history for this message
Stéphane Graber (stgraber) wrote :

Yeah, not much LXD can do about this unfortunately. We do create any missing intermediate directories as can be seen in this case, but there's no good way to know what the owner of every one of those intermediate directories should be, nor would it help here as skel still wouldn't get applied.

You pretty much have two options:
 1) Only add the device after the container initial's start
 2) Bind-mount this stuff somewhere other than the user's home directory

In the second case, I guess you could have a cloud-init snippet which then sets up a systemd unit to bind-mount that inside the container from /srv/whatever to /home/ubuntu/foo.