Search code examples
ubuntupermissionsxampproot

Give user permissions to htdocs in Ubuntu


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


Solution

  • 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