小编Hen*_*k D的帖子

Vagrant:config.vm.provision 不允许我将文件复制到 etc/nginx/conf.d?

我正在使用 Nginx 服务器。我想使用 Vagrantfile 将配置文件复制到 /etc/nginx/conf.d。我使用的命令是:

config.vm.provision "file", source: "./bolt.local.conf", destination: "/etc/nginx/conf.d/bolt.local.conf"
Run Code Online (Sandbox Code Playgroud)

我收到的错误是:

Failed to upload a file to the guest VM via SCP due to a permissions
error. This is normally because the SSH user doesn't have permission
to write to the destination location. Alternately, the user running
Vagrant on the host machine may not have permission to read the file.
Run Code Online (Sandbox Code Playgroud)

我正在使用便当/ubuntu-16.04 盒子。

我试图寻找一种方法来更改供应命令的权限,但我只找到了更改 config.vm.share_folder 命令的所有者的方法。

你知道答案吗?

nginx vagrantfile ubuntu-16.04

6
推荐指数
1
解决办法
4413
查看次数

标签 统计

nginx ×1

ubuntu-16.04 ×1

vagrantfile ×1