To change all the directories to 755 (drwxr-xr-x):
find /opt/lampp/htdocs -type d -exec chmod 755 {} \;
To change all the files to 644 (-rw-r--r--):
find /opt/lampp/htdocs -type f -exec chmod 644 {} \;
Make the current user own everything inside the folder (and the folder itself):
sudo chown -R $USER ~/.folder_name
Change folder and files owner and group:
chown -R user:usergroup /path/to/folder