failed to open stream: Permission denied in path on mac

C++
 sudo chmod -R 0777 /path
Source

Also in C++: