Question: I'm trying to pass an array from php (on a separate file) side to JavaScript and update HTML table. The array on the php side is a result of MySQL query.
Here is what I've done so far:

```
function updateSensorsTable() {
    $.getJSON("/getTableFromDB.php", function (json) {
     for (i = 0; i < 8;i++ )
         document.getElementById(i).innerHTML = json[i];
    });
}

```

```php
<?php

include("connect_to_mysql.php");

$result = mysql_query("SELECT value FROM sens" );

while ($row = mysql_fetch_row($result)) {
    $php_array[]=$row[0];
}

echo json_encode($php_array);

?>

```

Answer: 
Try modifying your `Vagrantfile` to include this line, before the end of the `Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|` block:

```
config.vm.synced_folder "/path/to/laravel/app", "/home/vagrant/projects/projectname", :owner => "www-data", :group => "www-data", :mount_options => ["dmode=775", "fmode=664"]

```

The string `"/path/to/laravel/app"` must point to dir you're working on outside the Vagrant machine. This should force the file owner and permissions to be the ones you specify for all the project files (so they're not overridden by **vagrant**). You'll need to restart the VM after you make the change.
How are you doing your `chown`? It should be

```
chown USERNAME GROUP -R /path/to/file

```