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
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答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
回答2:
set USER Permission
sudo chmod 755 -R /opt/lampp/htdocs
Proper way to install XAMPP in ubuntu is as below. open your terminal
Official document
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
回答3:
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