If you are trying to shift your workbase from Windows to Ubuntu then you may come across a similar situation. After installing xampp you might not be able to create any folders inside the /htdocs folder unlike windows.
Go to any place in the terminal and type the code below after the '>' symbol.
> sudo chmod 777 -R /opt/lampp/htdocs/
(Read more from source)
Extras : Another handy How to link a folder in your home directory to the webserver.