Symfony cache:clear无法删除目录

I am unable to successfully running cache clear on my Symfony application. I have set the permissions to the /var/cache directory as 777. But still get this error:

[Symfony\Component\Filesystem\Exception\IOException] Failed to remove directory "/vagrant/app/var/cache/de~/pools": .

Does anyone know what I am doing wrong here?

This was working before whilst I was using the file sharing type: nfs.

Updated my VM to run the latest version (1.9.5) of vagrant. Was then able to use nfs, see:

config.vm.synced_folder "./", "/vagrant", type: "nfs"

Are you sure you changed the permissions on the cachefolder recursively, and not just one the cache folder itself, (also, try chmod'ing from the host instead of the guest)

EDIT:

if PURELY FOR DEVELOPMENT, setup your vagrant shared folder like so:

  config.vm.synced_folder "/home/git/-something-", "/var/www/-something-/public_html", owner: "-something-", group: "nginx", mount_options: ["dmode=777,fmode=777"]