Vagrant on mac can't chmod -r 777 . for folders : Using Vagrant on mac with virtual box

I try to `sudo chmod -r 777 .' in /vagrant folder, or in the folder project in mac terminal, but in both cases only the files in the sub folders chmod but the folder doesn't chmod.

This cause my code to fail with `permission denied` because it cannot write to any folder.

If I go to a specific folder and do `sudo chmod 777 <folder name>' than it is working ok, but I have too many folders to do it manually.

Please help