Give user permissions to htdocs in Ubuntu
Solution 1
To change ownership of htdocs folder run following command. [Replace username with your own username]
sudo chown -R username:username /opt/lampp/htdocs
We also need to update httpd.conf file. Run following command to open
apache configuration file:
sudo gedit /opt/lampp/etc/httpd.conf
Find following lines:
User nobody
Group nogroup
The Complete answer with picutres is in this article
Solution 2
For easy accessing htdocs directory:
sudo chown -R youruser:youruser /opt/lampp/htdocs
Also you can make changes in httpd.conf file: sudo gedit /opt/lampp/etc/httpd.conf
173 User youruser
174 Group youruser
Solution 3
set USER Permission
sudo chmod 755 -R /opt/lampp/htdocs
Proper way to install XAMPP in ubuntu is as below. open your terminal
COMMANDS
1.) mkdir xampp
2.) cd xampp/
3.) wget https://www.apachefriends.org/xampp-files/5.6.20/xampp-linux-x64-5.6.20-0-installer.run
4.) chmod +x xampp-linux-x64-5.6.20-0-installer.run
5.) sudo ./xampp-linux-x64-5.6.20-0-installer.run
ACCESS phpMyAdmin
6.) sudo vim /opt/lampp/etc/extra/httpd-xampp.conf
AND COMMENT OUT THE FOLLOWING LINE
Require local
EX.
#Require local
Save and quit the file and restart XAMPP service
7.) sudo /opt/lampp/lampp restart
OVER COME THE SECURITY OPTION
8.) sudo /opt/lampp/lampp security
And follow the instruction
Sajith Herath
Updated on November 09, 2020Comments
-
Sajith Herath over 3 years
I installed xampp with root permission to opt/lampp folder in Ubuntu.but i cant access htdocs folder and unable to start apache server since the lampp folder has only root permission.How can i solve this and are there any proper way to install xampp in Ubuntu
-
Deepak Dixit almost 7 yearsCan you show the permission of htdocs ?
-