# cd /opt/lampp/
# sudo chown -R daemon htdocs
# sudo chmod -R g+w htdocs
On Apache the user is called daemon, therefore chown -R daemon htdocs.
Thanx to this post (my solution is for Linux the former was for Mac).
Now you can install whatever themes on the fly from the WordPress Dashboard.