Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Give user permissions to htdocs in Ubuntu [closed]

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

like image 1000
Sajith Herath Avatar asked Apr 22 '17 11:04

Sajith Herath


2 Answers

To change ownership of htdocs folder run following command. [Replace username with your own username]

sudo chown -R username:username /opt/lampp/htdocs

enter image description here

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

like image 117
Glory Avatar answered Oct 07 '22 00:10

Glory


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
like image 38
Nesimi Taghizade Avatar answered Oct 07 '22 00:10

Nesimi Taghizade