无法使用:owner和:group set设置synced_folder

问题描述 投票:0回答:1

当我使用以下语法设置不带:user:group的同步文件夹时,它可以正常工作:

config.vm.synced_folder "..", "/home/vagrant/repo"

如果我也尝试同时设置:user:group

config.vm.synced_folder "..", "/home/vagrant/repo", :owner => 'vagrant', :group => 'httpd'

我遇到一个错误:

Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

getent group httpd

The error output from the command was:

我将VirtualBox更新为6.0.20,也降级为5.2,并使用vagrant-vbguest安装了vagrant plugin install vagrant-vbguest。在来宾上,我还运行了sudo yum -y install kernel-headers kernel-devel错误仍然存​​在。解决办法是什么?

  • Vagrant版本为2.2.6,
  • 我正在运行config.vm.box = "generic/centos7"
  • 在OSX 10.14.6上
macos vagrant
1个回答
0
投票

在centos 7上,不是httpd用户正在运行Apache,而是apache

© www.soinside.com 2019 - 2024. All rights reserved.