I am working with a Nginx server. I want to copy a configuration file to /etc/nginx/conf.d with the Vagrantfile. The command I use is:
config.vm.provision "file", source: "./bolt.local.conf", destination: "/etc/nginx/conf.d/bolt.local.conf"
The error I receive is:
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.
I am using the bento/ubuntu-16.04 box.
I tried to search for a way to change the permissions for the provision command but I only found ways to change the owner for the config.vm.share_folder command.
Do you know the answer?