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.
1 |
$ 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.
1 |
$ sudo chown $USER:www-data -R /opt/lampp/htdocs |
3. Change the permission for htdocs to 755. Making writable only by owners.
1 |
$ 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)
1 |
$sudo nano /opt/lampp/etc/httpd.conf |
Change the lines saying :
1 2 |
User karan Group www-data |
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.
Recent Posts
Recent Comments
- LogixTree Networks on Localhost showing “Index/of” instead of displaying the Website
- AMANUR RAHMAN on Localhost showing “Index/of” instead of displaying the Website
- Christy on Support Purchase Notes in Order Emails WooCommerce
- LogixTree Networks on Localhost showing “Index/of” instead of displaying the Website
- Sofia on Localhost showing “Index/of” instead of displaying the Website