tmatilai / vagrant-proxyconf

Vagrant plugin that configures the virtual machine to use proxies
MIT License
531 stars 74 forks source link

Fix permission of docker client config #203

Closed takuto-h closed 5 years ago

takuto-h commented 5 years ago

When I setup a VM with vagrant-proxyconf 2.0.5 and run docker as a non-root user in it, I got the following message:

WARNING: Error loading config file:/etc/docker/config.json - stat /etc/docker/config.json: permission denied

It seems that this is because the permission of /etc/docker/config.json is set to 0600, which is the default permission of Tempfile.

https://github.com/tmatilai/vagrant-proxyconf/blob/v2.0.5/lib/vagrant-proxyconf/action/configure_docker_proxy.rb#L95

https://docs.ruby-lang.org/en/2.6.0/Tempfile.html

It needs to be 0644 for non-root docker users.

codylane commented 5 years ago

@takuto-h - Thank you for fixing this, this looks good to me. Merging.

codylane commented 5 years ago

Released 2.0.6 with your changes. Thanks again!