Just installed Xampp under Ubuntu OS. After installation of xampp, Weird issue came which is related to permission. All CMS and WordPress installations unable to modify and create the directory files. To fix this follow the steps below :
1. Verify that your username is added to ‘www-data’ group that going to access our server files.
$ sudo adduser $USER www-data
2. After that you may need to change owner of server’s public directory, It could be www or htdocs, In my case it’s htdocs.
$ sudo chown $USER:www-data -R /opt/lampp/htdocs
3. Change the permission for htdocs to 755. Making writable only by owners.
$ sudo chmod u=rwX,g=srX,o=rX -R /opt/lampp/htdocs
4. Last step is make the apache instance with our newly details. (you may have to edit your own username in place of mine)
$sudo nano /opt/lampp/etc/httpd.conf
Change the lines saying :
Why changing to your username. you can have any user like www-data in place of your username. Then you might have to access ftp using www-data to get it working properly.
5. Restart the apache in last. If no error arise every thing will be good.
Happy Coding. Post us if got issue in above steps.