2

I recently installed Lampp server (version 1.7.7) so I went to my local folder, which I believe is in /opt/lampp/htdocs because that's where I've installed my server, and wanted to create a folder where I can put my projects, but I couldn't because the option in the right-click menu isn't even available.

How can I create a directory here?

muru
  • 207,228

4 Answers4

8

First off, I'd do what others have suggested and point your browser at your home folder for the project, but to answer your question....

It's not available because your user doesn't have write access to it, you could...

  • give your self access

    sudo chown $USER:webuser /opt/lampp/htdocs/
    sudo chmod 755 /opt/lampp/htdocs/
    
  • create the directory from the command line

    sudo mkdir /opt/lampp/htdocs/your_project
    sudo chown $USER:webuser /opt/lampp/htdocs/your_project
    sudo chmod 755 /opt/lampp/htdocs/your_project
    

Note on the chown one, check the webuser, probably www-data, but I've seen it as apache

Zanna
  • 72,312
geermc4
  • 1,503
0

Change your DocumentRoot and place it in, for example, /home/your-name/my_websites folder

Fero
  • 11
-1

The safest way to use you projects would be simply to store your files elsewhere and Just keep links to these files in your projects folder.

-1

Just follow these two steps to resolve it.

  1. goto your lampp folder using Terminal :
    cd /opt/lampp

  2. Run this command : sudo chmod 777 -R htdocs

Now you can easily access lampp folder and can do whatever you want.