-
Notifications
You must be signed in to change notification settings - Fork 821
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
Insecure world writable dir /mnt/c in PATH #2476
Comments
Remove One somewhat modest proposal on the slow boat to
That feature would be nice to see, in isolation, without otherwise changing the current behaviour. |
I don't have this registry key. Can I create it? |
I love ruby, but ruby is here excessively verbose where it really does not need to be. What is even worse, to the best of my knowledge there is no trivial way to tell ruby to just shut up here. I, and various others, have suggested better fine-tuned control for ruby's warning system to ruby-core but this will probably take until ruby 3.x is released (ruby-core is very busy too, unfortunately... so things get queued up... plus ruby kaigi is coming in japan soon, so they are preparing for that event). There are some ad-hoc workarounds. Modifying the $VERBOSE variable can probably help. You can keep a reference copy to the old value, set $VERBOSE to nil, and then restore the old value again. I use this in some of my older gems... but it's a bit annoying still to do. Another way would be to run gem install via a "sandbox" where you invoke IO.popen; that way you can control what is output to you as a user, if the above really disturbs you. It disturbs me too, by the way, but it can also be ignored - it's just a warning. A pointless one but still only a warning. For example, the variant via IO.popen would be like this:
Put this into a method, where the input argument should be the name of the .gem file - et voila. (Don't forget to put stuff into the {} lines... like just for debugging purpose; and perhaps also show the command that is to be run, just so you know that things happen, rather than everything be silent.) It's a bit verbose but that way you get 100% control over the message that is output; you can also play with 2>&1 and select streams that you want to have. See also ruby Kernel's select(). But to be honest, the proper way to fix it would be upstream at ruby; either to disable this message, which hasn't been in older ruby versions (good approach) or allow people to fine tune and control warnings as they want to (the more sophisticated approach). Of course there are also other ways such as named by therealkenc - but the thing is... I think that the one at fault here is ruby, not the underlying OS or file system. Perhaps changing the permissions works as therealkenc showed, I haven't yet tried myself but it would make sense if this can be done.
Hmm. Are you sure that not $PATH was meant from within the bash-shell, rather than the windows registry? |
You can set an absolute
If the entry doesn't exist, create it. [I have never set the flag personally, YRMV.] Your fix is even better. With the registry change you'll lose WSL interop via $PATH. Still hope we get the |
Forgot to clarify. This issue appeared after update Windows and reinstall WSL. I did not make any changes with $PATH or other system settings. |
This is happening to me too on Ubuntu 16.04.3 LST Xenial, didn't happen on previous (I think it was Trusty). Any ideas of how to silence this? #81 |
Forgot about this one. Work-arounds are in the comments above. This is linux-behavior (by-design Ruby). The reason you were not seeing this previously is that |
Thanks for the reply. I'm not really building a gem or in control of the console output, I'm using Rails and this message pops up whenever I start the server, create a migration, etc. Would you know of any way to silence the message if |
I don't know enough about Rails to tell you (mostly I can spell Rails). Maybe someone who knows more will jump in, but you might get more hits in that community than here. I agree entirely that forgoing |
Run 'chmod -R o-w /usr/local/m'. |
Any news on this? |
Just an FYI for others running into this problem and finding this closed issue... You can remove all those
If you add that line to your |
Do I want those bin dirs in my path? What could break if those are removed? Just curious, thanks |
Doing this won't break anything related to the Linux side. It just removes access to the windows applications from the active path. You can test it out by running the export PATH line in an open shell. When you close the shell and re-open and you'll be back to the default behavior w/o any changes. |
This can be resolved by adding the following to
|
This doesn't work for me. my specific error is
|
Why is this closed? It's not solved. /etc/wsl.conf doesn't even exist. I tried creating it and adding the automount thing, but that doesn't work either. |
How is it possible that even with root permissions, I can't fix any of the permissions on /mnt/c ? I get "Permission denied" errors when I try. |
Yeah experiencing this issue trying to bundle install a rails gemfile. Nothing seems to work from above. |
Same sort of error when trying to install brew, which is popular and would be nice to have on Windows. |
I just ran into this on WSL2 and Windows build
I had to restart in order to get it to take. |
Hi!
When I install gems I see this warning.
Is it possible to fix this?
Windows build: 15063.483
Version: 1703
The text was updated successfully, but these errors were encountered: