copy failed to open stream: Permission denied code example Example: failed to open stream: Permission denied in path on mac sudo chmod -R 0777 /path