Enable Apache writable files.
Depending on the web application apache might need to be able to create new files or directories, this is very much the case when using frameworks like Laravel, Yii or Symphony…
All you need to do is assign the
www-data user as the file and group owner, for the directory where your apapche web root is located, usally this is
Make sure the vagrant is not running:
Open your Vagrantfile in an editor.
:owner => "www-data", :group => "www-data" to
If you are still using v1 config files, add it to
The complete command should look simular to the code below, make sure to update the path
Vagrant.configure("2") do |config|
config.vm.synced_folder "/location/to/locahost/sites", "/var/www", id: "vagrant-root", :owner => "www-data", :group => "www-data"
Save the file.
Now if you use
vagrant ssh and look at
/var/www the owner and group should be
www-data and apache will be able to create new files and directories.