2

Trying to set up a little Vagrant development environment right now using the Laravel framework and need to make my /vagrant/storage/views folder writeable, but I cannot get the permissions on the folder to change no matter what!

I have done:

sudo chmod -R 777 /vagrant/storage/views

...and still am left with rwxr-xr-x permissions on that folder afterwards. I can change permissions of files, but not folders within my /vagrant folder.

Anyone have any ideas on how to solve this? Thanks.

Phill Sparks
  • 20,000
  • 3
  • 33
  • 46
ARW
  • 3,306
  • 7
  • 32
  • 41
  • Are you using VirtualBox provider (the default)? Maybe it's related to their shared folder mechanism.. – cmur2 Apr 12 '13 at 22:09

2 Answers2

6

In case anyone else runs into this, the problem was that I was trying to change the permissions on the shared folder from within the virtual machine. As soon as I just changed the permissions on my host copy of the folder, it propagated through to the guest machine's copy of the folder just fine.

ARW
  • 3,306
  • 7
  • 32
  • 41
  • 1
    This doesn't do it for me unfortunately ... It keeps complaining about not being able to write sessions in the storage folder. Any ideas? – Shai Mishali Aug 05 '13 at 15:02
  • What permissions do you have on the host folder and what do they show up as on the guest machine? – ARW Aug 06 '13 at 01:36
  • Started working eventually ... Don't even remember what I did. Thx! :) – Shai Mishali Aug 06 '13 at 10:05
  • @ARW : You seriously saved me eventually. I had spend my whole day. End of the day, I came to figure out from you that permission should be given to host copy folder rather than folder in my virtual box. I was really tired and almost giving up Vagrant ;). Thanks ARW. – score May 23 '14 at 13:02
0

I am using this solution. I though I's share for Vagrant 1.6.3

config.vm.synced_folder "LOCAL FOLDER", "/var/www", mount_options: ["dmode=777","fmode=666"]

LOCAL FOLDER = I put my site in a folder. Since the folder is in the same directory as my Vagrantfile I dont have a slash before or trailing.

/var/www = this is where my site lives on the guest.

mount_options = i had trouble with some -R permissions and such - this seemed to fix it.

daveferrara1
  • 87
  • 1
  • 11