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

blt vm writes to bashrc in DrupalVM and leaves it unwritable #1771

Closed
christopher-hopper opened this issue Jul 7, 2017 · 0 comments
Closed
Labels
Bug Something isn't working

Comments

@christopher-hopper
Copy link
Contributor

My system information:

  • Operating system type: macOS Sierra
  • Operating system version: 10.12.5
  • BLT version: 8.9.0-rc1

When I run this command:

vendor/bin/blt vm
vagrant ssh
drush init

I get the following output:

Append the above code to /home/vagrant/.bashrc? (y/n): y
file_put_contents(/home/vagrant/.bashrc): failed to open stream: Permission denied init.drush.inc:119                                      [warning]
Updated bash configuration file /home/vagrant/.bashrc                                                                                      [ok]
Start a new shell in order to experience the improvements (e.g. `bash`).                                                                   [ok]

And I expected this to happen:

Append the above code to /home/vagrant/.bashrc? (y/n): y
Updated bash configuration file /home/vagrant/.bashrc                                                                                      [ok]
Start a new shell in order to experience the improvements (e.g. `bash`).                                                                   [ok]

The owner of the ~/.bashrc is being changed, to an unknown user within the VM. I'm assuming its the uid of a user on my Host MacOS machine. This seems to be happening because you're injecting your blt-alias into the top of the ~/.bashrc without asking and leaving the file with an invalid owner:group, but I'm not 100% sure.

When I check the owner:group of ~/.bashrc I see this:

-rw-r--r-- 1 971499904 vagrant_group 4038 Jul  7 02:22 /home/vagrant/.bashrc

What I should see is this:

-rw-r--r-- 1 vagrant vagrant 4465 Jul  7 04:04 /home/vagrant/.bashrc
@christopher-hopper christopher-hopper changed the title blt vm writes to bashrc in the DrupalVM and leaves it with the wrong owner blt vm writes to bashrc in DrupalVM and leaves it unwritable Jul 7, 2017
@grasmash grasmash added the Bug Something isn't working label Jul 7, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jul 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants