I'm using Vagrant to bring up a web server for most of my projects but stumbled across an issue where Apache/PHP wasn't able to write to a SQLite database. The solution was to add the following to my Vagrantfile:
config.vm.synced_folder ".", "/vagrant", owner: "www-data", group: "www-data"
That, along with usermod -a -G vagrant www-data within the guest OS, did the trick.
http://stackoverflow.com/questions/26373744/application-cant-create-a-writable-folder-with-vagrant