0
votes

Hi I am trying to edit the owner of a laravel directory that I have, I am doing this via the config file for vagrant as below:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
  config.vm.network :private_network, ip: "192.168.33.21"
  config.vm.provision :shell, :path => "install.sh"
  config.vm.synced_folder ".", "/var/www”
    config.vm.share_folder "v-root", "/tempus2/app/storage", ".", :owner => "www-data"

end

however I get the following error:

 Users/guti/Public/Sites/Vagrantfile:13: syntax error, unexpected tIDENTIFIER, expecting
 keyword_end
 config.vm.share_folder "v-root", "/tempus2/app/storage...
                       ^
/Users/guti/Public/Sites/Vagrantfile:13: syntax error, unexpected tSTRING_BEG, expecting     keyword_do or '{' or '('
...config.vm.share_folder "v-root", "/tempus2/app/storage", "."...
...                               ^
/Users/guti/Public/Sites/Vagrantfile:13: syntax error, unexpected tSTRING_BEG, expecting     keyword_do or '{' or '('
...v-root", "/tempus2/app/storage", ".", :owner => "www-data"
...                               ^
/Users/guti/Public/Sites/Vagrantfile:13: syntax error, unexpected tSTRING_BEG, expecting '('
...t", "/tempus2/app/storage", ".", :owner => "www-data"
...                               ^
/Users/guti/Public/Sites/Vagrantfile:13: syntax error, unexpected tIDENTIFIER, expecting keyword_end
...p/storage", ".", :owner => "www-data"
...                               ^
/Users/guti/Public/Sites/Vagrantfile:13: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
/Users/guti/Public/Sites/Vagrantfile:13: unterminated string meets end of file

What is the correct syntax for www-data? also how can I extend the config file to change the permissions for this folder and all subdirectories to 777?

All i want to do is make the tempus2/app/storage directory writeable by www-data for laravel purposes. THe full directory on my machince is User/[username]/Public/Sites/tempus2/ and my vm is /var/www/tempus2 or when i ssh into vagrant cd /vagrant/tempus2. but how can i change the permissions on this folder for my vagrant vm?

1

1 Answers

3
votes

share_folder isn't available in Vagrant 1.1+ (that's the old syntax), its now synced_folder. Also it looks like your double quote on the "/var/www" line is not actually a double quote character, probably copy and pasted from somewhere.