Give user permissions to htdocs in Ubuntu [closed]

大憨熊 提交于 2019-12-21 12:15:15

问题


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:


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



回答3:


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



来源:https://stackoverflow.com/questions/43558542/give-user-permissions-to-htdocs-in-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!