Open bosungs opened 3 years ago
append info
bosungkim@DESKTOP-6BV2M48:/mnt/c/test_dir/vagrant-project$ cp /mnt/c/Users/bosung-vm/.vagrant.d/insecure_private_key .
bosungkim@DESKTOP-6BV2M48:/mnt/c/test_dir/vagrant-project$ ll
total 4
drwxrwxrwx 1 root root 4096 Nov 25 16:45 ./
drwxrwxrwx 1 root root 4096 Nov 25 13:37 ../
-rwxrwxrwx 1 root root 1675 Nov 25 16:45 insecure_private_key*
Currently, the same issue is occurring for both my workstation and laptop. I hope it will be revised as soon as possible.
Looking at the traceback, it seems to be setting the mode of this file for copy_insecure_private_key.
The syntax in which an error occurs is written as follows.
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:1059
if Util::FileMode.from_octal(@default_private_key_path.stat.mode) != "600"
This syntax seems to be if there is no permission of 600, sets the permission 600. And when I saw the permissions of my corresponding files, it was 777.
So, the permissions of the corresponding file are above 0600. it seems that there is no need to change to chmod.
I tried changing the operator from != to <and confirmed that the issue no longer appears.
To summarize, this is solved by changing the following syntax to: /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:1059
from
if Util::FileMode.from_octal(@default_private_key_path.stat.mode) !=
"600"
to
if Util::FileMode.from_octal(@default_private_key_path.stat.mode) <
"600"
Vagrant version
vagrant 2.2.6
Host operating system
Windows 10 pro and WSL
Guest operating system
ubuntu/trusty64
Debug output
Expected behavior
vagrant init ubuntu/trusty64 on Windows 10 WSL
Actual behavior
An error occured while executing
vagrant init utubunt/trusty64
Steps to reproduce
WSL install install ubuntu on Microsoft Market