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

/vagrant directory not writeable when using lxc and a user without uid 1000 #107

Closed
fanderegg opened this issue Aug 24, 2016 · 3 comments
Closed

Comments

@fanderegg
Copy link

When the user doing vagrant up has a different uid than 1000, the /vagrant directory
is not writeable by ansible. This only happens when using the lxc vagrant provider.

Reproduction Steps:

  1. Use a drifter role which writes to the /vagrant directory, e.g. django + postgresql
  2. Login with a user with another user id than 1000 (create a second user)
  3. vagrant up --provider lxc

Expected behavior:
/vagrant directory is writeable

Observed behavior:
/vagrant directory is not writeable because it has a different owner than the vagrant user inside
the vm:

TASK: [django | fill in DATABASE_URL setting] ********************************* 
failed: [default] => {"checksum": "2048f78383d79925c8c50b146cc80c3e555c986e", "failed": true}
msg: Destination /vagrant//envdir not writable

Drifter version: 688778c
Vagrant version: 1.8.4
OS and version: Ubuntu 16.04.1 LTS

Additional information:

  • Problem started happening recently, didn't happen in an older version of Drifter: No
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens to my colleagues aswell or only me: Yes
@krtek4
Copy link
Contributor

krtek4 commented Aug 24, 2016

Related issues on vagrant-lxc : fgrehm/vagrant-lxc#151

@sephii
Copy link

sephii commented Nov 29, 2016

Unfortunately this doesn't seem related to Drifter but to LXC / vagrant-lxc. Have you tried setting lxc.id_map in your LXC configuration? From the lxc.container.conf manpage:

lxc.id_map
Four values must be provided. First a character, either 'u', or 'g', to specify whether user or group ids are being mapped. Next is the first userid as seen in the user namespace of the container. Next is the userid as seen on the host. Finally, a range indicating the number of consecutive ids to map.

@sephii sephii removed the type: bug label Nov 29, 2016
@sephii
Copy link

sephii commented Dec 2, 2016

I'll close it since it's not related to Drifter. Feel free to put your findings in here though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants