Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[learning LXD] Better way of sharing directories #2

sparkiegeek opened this Issue Feb 5, 2019 · 2 comments


None yet
2 participants
Copy link

sparkiegeek commented Feb 5, 2019

The fundamental issue with sharing directories is having the kernel know that you're really the same user.

The preferred, and easy way to do this is to setup a mapping of userids from the host to the container.

$ lxc launch ubuntu:bionic example-container-c raw.idmap="both $UID 1000"
$ lxc config device add example-container example-share disk source="/path/to/directory/to/share" path=/home/ubuntu/whatever

This comment has been minimized.

Copy link

nottrobin commented Feb 5, 2019

@sparkiegeek sorry, did you say that this actually won't work in a default LXD install?


This comment has been minimized.

Copy link

sparkiegeek commented Feb 5, 2019

@nottrobin yes, sorry got distracted.

covers the changes needed to /etc/subuid and /etc/subgid

@nottrobin nottrobin closed this in ffabe7e Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.