Setting open permissions like this is usually the wrong thing to do. What leads you to believe it is the solution you want? What are you trying to do, what do you expect to happen, and what actually happens? Do you have Apache configured and running, or do you just want local access to the xampp docs? Whatever the case, it seems as if setting permissions to 777 is a bit of a sledgehammer approach.
Beyond that, your chmod syntax is incorrect:
chmod -R 777 /path
The -R flag goes before the mode specification, not after it. It is also probably a capital R and not a lower case r (but I don't use Linux so don't take my word on that - look at the manpage to get all the gory details).
chmod 777is never the right thing. What are you trying to do? You probably need to set the ownership or add a group permission on this file. What user/group does xampp run as? – Gilles Sep 28 '12 at 23:03