And if you don't want to use the terminal:
go to the xamppfiles folder, to htdocs and right click or control click and go to Get Info -- scroll down to permissions and update them to you for read and write, you will need administrator privileges to do that. Also, check the folder you are dragging into the htdocs folder for what permissions are set there -- if you need to change those permissions make sure you click the button at the very bottom of the dialog box "Apply To Enclosed Items" also.
further reading:
http://support.apple.com/kb/HT2963?viewlocale=en_US