XAMPP error figuring out?
I believe that you have the key to the answer in your question. It is a permissions issue and there are at least two ways that you could fix it. Ultimately, though, it is likely that Google Drive owns the file and then when the web server in XAMPP tries to execute it, it is denied. Likely, the web server isn't even in the same group as GD and therefore the Unix permissions should end in at least 5. I suspect that setting the files to the infamous (and absolutely rightly so) 777 would correct the problem. A permissions number ending with 7 indicates that you are giving the public full access to read, write, and execute the script. 

For a resolution, move to git. I'm not aware of anyone using Google Drive as a deployment strategy, although I'm sure someone has. I believe the most popular version control is Git, which would be good to learn anyway as you will need those skills if you work for a development shop. 

A second option would be to write a little bash or Apple script to change the file permissions.