Making Laravel storage directories play nicely with Vagrant
If you're using Laravel under Vagrant, you may have run into issues where there aren't sufficient permissions for Laravel to do things with the storage
directories for things like caching and sessions.
This is all down to how Vagrant maps folders, and the fix is easy. At the end of your config.vm.synced_folder
line you just need to add an option to define the permissions:
:mount_options => ["dmode=777","fmode=666"]
so
config.vm.synced_folder "./", "/var/www", id: "vagrant", :nfs => false
becomes
config.vm.synced_folder "./", "/var/www", id: "vagrant", :nfs => false, :mount_options => ["dmode=777","fmode=666"]
Written by Nick Jackson
Related protips
3 Responses
Thank you so much for this entry, it helped a lot!
over 1 year ago
·
Thanks for this, quick solution and it worked perfectly!
over 1 year ago
·
Worked Perfectly. Thank you
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Laravel
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#