-
Notifications
You must be signed in to change notification settings - Fork 87
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
How to avoid that Parallels mount my home folder in guest? #171
Comments
Sorry, it is not possible to do this via Vagrant, because there is not such option in prlctl. :( Custom shared folders, defined by Vagrant, are not affected by this setting and will be available in the guest OS. P.s. |
Hi, Now I'm using the GUI to exclude the home from my project, but this settings is lost when I destroy the VM. I think that have the home folder mounted by default is a big secure risk, because if I forget to disable it, I expose the home folder to an environment that should have some critical bug. An another risk is about the sharing feature (http://docs.vagrantup.com/v2/share/ssh.html). I have never used it yet, but I think that share an ssh with home mounted can give access at reserved document to colleges or friends. I hope that Parallels will add this option in prlctl as soon as possible. Thank you for your answer. I have appreciated it a lot ;) |
Thank you for an explanation. I'll keep you in touch here and will let you know when it will be implemented in prlctl. So, I think this issue can be closed. |
UPDATE: It appears that vagrant-triggers is not needed for this hack. For some reason (at least with v9), the following is sufficient (i.e., # Vagrantfile
...
config.vm.provider :parallels do |v, override|
override.vm.provision :shell, :inline => (q{
set -ex
if [ -d /media/psf ] ; then
for i in /media/psf/* ; do
if [ -d "${i}" ] ; then
umount "${i}" || true
rmdir -v "${i}"
fi
done
rmdir -v /media/psf
fi
exit}).strip
end
... Can someone verify whether this approach works on v10? _WARNING__: None of these hacks protect against certain attacks that would be avoided by never having those mount points in the first place (see example below)._ I haven't tested this, but In the mean time, as a hack, one could use emyl/vagrant-triggers and a script to force #!/usr/bin/env sh
set -ex
if [ -d /media/psf ] ; then
for i in /media/psf/* ; do
if [ -d "${i}" ] ; then
umount "${i}" || true
rmdir -v "${i}"
fi
done
rmdir -v /media/psf
fi
exit Then call it on # Vagrantfile
...
config.vm.provider :parallels do |v, override|
override.vm.provision :shell, :path => 'umountpsf.sh'
override.trigger.after :up do
run "vagrant ssh -c /vagrant/umountpsf.sh"
end
end
... But I agree, this should not be necessary. Auto-mounting by default is a _huge_ security no-no.1 😠 At the very least, Parallels' own boxes should completely disable all sharing by default except for 1 Imagine a situation where an attacker manages to replace |
@chrvadala I'm sorry for the late response. The CLI option for managing this was implemented in Parallels Desktop 11.0.0. This is how to disable "Home" folder sharing:
In Vagrantfile it could be done this way: config.vm.provider "parallels" do |v|
v.customize ["set", :id, "--shf-host-defined", "off"]
end I will add this option to the list of default settings for all VMs, in addition to #215 |
I have removed a lot of shared folders with this lines
but Home folders is already there
The text was updated successfully, but these errors were encountered: